Push to GitHub without a password using ssh-key

前端 未结 6 1632
青春惊慌失措
青春惊慌失措 2020-12-12 08:59

I generated an SSH key pair without a password and added the public key to GitHub.

Connection with

user@dev:/var/www/project# ssh -T git@github.com
H         


        
6条回答
  •  没有蜡笔的小新
    2020-12-12 09:26

    As usual, create an SSH key and paste the public key to GitHub. Add the private key to ssh-agent. (I assume this is what you have done.)

    To check everything is correct, use ssh -T git@github.com

    Next, don't forget to modify the remote point as follows:

    git remote set-url origin git@github.com:username/your-repository.git
    

提交回复
热议问题