Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Running a git pull with ssh remote command

Xavi November 11, 2019
branches: master: 
-
step: *PHPCS
-
step: name: Deploy to Demo
deployment: demo
# trigger: manual # Uncomment to make this a manual deployment.
script:
-
echo "Deploying to demo environment"
-
apt-get update -y
-
apt-get install -y ssh
-
ssh -A -T $ssh_user@$ssh_host "git --git-dir=$path/.git --work-tree=$path pull origin master"

I have this in my pipelines file. the ssh logs in to the remote server. I have tested a similar command locally with the save value the variables have and it works as expected. In the pipelines though I keep getting an access denied public key error,

Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

 any ideas, would be greatly appreciated.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events