We are trying to build a shared library on one Bamboo Build project, and then push the artifact into a git repository hosted in another STASH/Bitbucket instance. We can get the repository from STASH for the target git repository by using the "Source Code Checkout" task, and then we attempt the following script:
git config user.email "<my-email>"
git config user.name "Bamboo Build Server"
git add --force .\libs\armeabi-v7a
git commit -m "${bamboo.buildResultKey}: Updating Native Libraries from Bamboo build on secure server (Build # ${bamboo.buildNumber})."
git remote remove origin
git remote add origin ssh://git@htlsrv01:7999/myov/myovistaapp.git
git push origin master
At run time, we get the following error:
23-Sep-2017 16:01:08 | Host key verification failed. |
23-Sep-2017 16:01:08 | fatal: Could not read from remote repository. |
23-Sep-2017 16:01:08 | |
23-Sep-2017 16:01:08 | Please make sure you have the correct access rights |
23-Sep-2017 16:01:08 | and the repository exists. |
23-Sep-2017 16:01:09 | On branch remove-native-code |
23-Sep-2017 16:01:09 | nothing to commit, working tree clean |
Execute these command from the agent manually. Once that works, you will be able to do it from the build too.
Almost... I had to also run my Bamboo service as a "Local User" instead of as a "System User". Once I did this things started working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.