Question

Running shellscript inside server, with git pull fails

Posted November 14, 2018 977 views
UbuntuGitDigitalOcean

HI, i have an app deployed on digitalocean that works fine, i just started using circle ci, which also seem to do its job well, however im running into the issue where i cant do a git pull. If i try to run this from my local computer:

ssh -oStrictHostKeyChecking=no  XXXX@XXXXXXXbash './deploy.sh'
Enter passphrase for key '/Users/alexandermunckafrosenschold/.ssh/id_rsa':
should cd into directory
Now git pull
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I get this, i get the same error when i run it from the circleci config. Any clues on why i get this?

This is my config for my circle ci config:

steps:
- checkout:
path: ~/XXXXXX
- addsshkeys:
fingerprints:
- “XXXXXXXXXXXXXXXXXXXXX”
- run: ssh -oStrictHostKeyChecking=no -v $DROPLETUSER@$DROPLETIP bash ‘deploy.sh’

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

I can run git pull manually though from inside the ubuntu server

Submit an Answer