Otto
Otto

Reputation: 693

Digitalocean and github (permission denied)

I have a server on digitalocean and I want to connect it to git. (not even push anything, just connect).

When I test my connection with: ssh -T [email protected].

I get an error of [email protected]: Permission denied (publickey). I have tried everything to try to make the connection work. On my computer the connection works, and the key on my root server is linked to my local id_rsa. The key is the same and I checked this with ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub on both my server and computer.

I am following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-laravel-application-with-nginx-on-ubuntu-16-04

Any ideas? I am stuck and going insane.

Upvotes: 3

Views: 4214

Answers (2)

Josir
Josir

Reputation: 1644

You should add the public key created on your server on github.

Upvotes: 2

Dino Numić
Dino Numić

Reputation: 1452

Recently I faced a similar issue on digital ocean.

  1. start the ssh-agent eval "$(ssh-agent -s)"
  2. add your private key ssh-add ~/.ssh/id_rsa

Hope this helps and that it is the cause of your problem.

Upvotes: 6

Related Questions