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.pubI 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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
In order to use SSH as your GitHub authentication method you need to do the following:
cat ~/.ssh/id_rsa.pub
If you do not have an SSH key pair already on your server, generate a new one with the following command:
ssh-keygen.
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:
git@github.com:YOUR_USER/YOUR_REPO_NAME.git
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.