How to push changes to a linked repository?

I'm trying to push some changes that happen during a build plan to a linked repository, but I keep getting the same error message:

19-Feb-2015 17:01:16Host key verification failed.
19-Feb-2015 17:01:16fatal: Could not read from remote repository.
19-Feb-2015 17:01:16 
19-Feb-2015 17:01:16Please make sure you have the correct access rights
19-Feb-2015 17:01:16and the repository exists.

Here's the script task I'm using to try to push:

# set the origin remote to our developer sandbox
gitremote=`git remote -v`
if [[ -z $gitremote  ]]; then
    git remote add origin $devrepourl
elif [[ $gitremote == *nothing* ]]; then
    git remote set-url origin $devrepourl
# set up git user
if [[ -z $bamboouser ]]; then
    bamboouser="Atlassian Bamboo"
git config $bamboouser
git config $bambooemail
# add, commit and push changes
filelist=`git status -s`
if [[ -n $filelist ]]; then
    git add src/*
    git commit -a -m "$commitmsg $filelist"
    returnval=`git push origin $branchname`
    if [[ -z $returnval ]]; then
        exit 0;
        exit 1;
    echo '**** Nothing to commit ****'
    exit 1

I'm using this cookbook for Atlassian - I've also replaced every variable by the real value (username/password/server), just to make sure this wasn't the problem. I also set the right private key in my Shared Credentials, and the public key in an user profile that has R/W access to the specific linked repository.

Any idea how I could fix this?

1 answer

I'm having the same problem here as well - between Bamboo and Stash.


Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,796 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you