Github unauthorised pull requests on VPS (DigitalOcean Droplet)

System Information
  • Strapi Version: 3.6.3
  • Operating System: Ubuntu 20.04.2
  • Database: PostgreSQL
  • Node Version: 14.17.1
  • NPM Version: 6.14.13
  • Yarn Version: 1.22.10

I followed the guide from the Strapi Docs to get up and running on a VPS (DigitalOcean Droplet).

The guide was pretty good and got me set up, but my problem is with the ‘Setting up a webhook on DigitalOcean / Github’ part of the guide. The issue is simply VPS related though and the fact it’s on DigitalOcean is probably beside the point.

The issue is with the git pull part. I get an authorisation error when it’s performed. If I pull manually, I can simply add my credentials when prompted but since it’s automated, I can’t.

I tried adding an SSH Key which seems to be set up correctly and accepted by github, this didn’t solve it.
I tried modifying the pull request by adding the .ssh link like git pull and still the same result.

Does anybody know a way around this? Automated re-builds from git would be really nice to have. Could it have anything to do with the .ssh directory being within my non-root-user directory?

Thanks for any help.

The issue is most likely to how it was originally cloned, when you originally pulled in the repo to the server did you use the ssh address or the normal http one?

You can check using the git remote show origin


With the SSH key setup you need to ensure the local repo on the server has it’s upstream set to the proper address.


1 Like

Thanks for the quick response, you’re really helpful on these forums!

I’ve checked both of those things and they seem correct.

I noticed that I was also asked for my credentials when running git remote show origin, maybe it’s a more generalised git problem I’m having, as opposed to that specific repo?

Regardless, it turns out I’m an idiot and my workaround with SSH Key and ssh link actually worked, I just forgot to restart the webhook service :man_facepalming:t2:

Hahaha, interesting yeah it could be a more generalized git error. :thinking: but glad you got it working.