Hi,
I am cloning the stash repository using Bamboo and then adding one file , committing it to push. I am not able to push the code to remote repository where as it is pushing to local repository only.
D:\Apps\Atlassian\Data\Bamboo\xml-data\build-dir\IRIS-IRGIT-JOB1>D:\GIT\Git\cmd\git.exe push origin develop | |
23-Jan-2017 15:27:59 | To file://D:\Apps\Atlassian\Data\Bamboo\xml-data\build-dir\_git-repositories-cache\7f363ec58eaf0b8a31de372c238909c1f8510801 |
23-Jan-2017 15:27:59 | eeca324..fecb2d3 develop -> develop |
Here is the code that I have in script job
echo "create the file"
echo "${bamboo.version}.${bamboo.major}.${bamboo.minor}" >> file1.txt
D:\GIT\Git\cmd\git.exe add file1.txt
D:\GIT\Git\cmd\git.exe commit -m "adding a file"
D:\GIT\Git\cmd\git.exe remote add origin ssh://git@gitserver:7999/test/test_src.git
D:\GIT\Git\cmd\git.exe push origin develop
Can any one please guide me how I can push that to remote repo.
Thanks for help in advance.
Hello Omprakash,
When using Bitbucket server (former Stash) as repository type in Bamboo, Bamboo create a SSH keypair and this is the way Bamboo communicates with Bitbucket server when running Source Code Checkout task. When running the Source Code Checkout task, Bamboo creates the .git under the build working directory and this does not have reference to the actual repository in Bitbucket server (Bamboo uses a git cache instead), so you are not able to push against your repository.
Please, I would suggest you on referring to https://confluence.atlassian.com/display/BAMKB/How+to+push+to+repository+under+SSH+protocol+using+Script+task for further information.
—
Kind regards,
Rafael
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.