Trying to deploy a django I constantly failed to authenticate my Github account.
I face two different issues:
How to automate the Github authentication?
Which password should I use?
I run:
ssh keygen
add key.pub
add agent and authenticate
In Github I:
On my DO server I note the file /etc/ssh/sshd_config
has:
PasswordAuthentication no
#Port 22
##HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed----_key
Should I uncomment any of these?
After adding the clone git command I request to add my GitHub username and password… then it fails.
I tried with:
id_rsa.pub
I constantly fail.
I run the command to a user (not root) that was granted rights.
Any tip, advice on how to overcome this hurdle would be highly appreciated
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.
Hello,
In order to use SSH as your GitHub authentication method you need to do the following:
SSH keys
-> and add the public key there.Make sure that the key is added correctly without any new lines.
Once you’ve added your SSH key there, make sure that you clone your repository with SSH and not HTTP. Your repository URL should look like this:
You should not make any changes to the
sshd_config
file as this file is your SSH server configuration file for your Droplet itself and should not affect your GitHub SSH connection.For more information on how to get started with Git I would recommend this free eBook here:
Introduction to Git and GitHub
Let me know how it goes. Best, Bobby