Skip to content

How to git push from terminal using SSH?? #161755

Closed Answered by 8gudbits
connect-24 asked this question in New to GitHub
Discussion options

You must be logged in to vote

Since you have already tried some stuff, I'm guessing you know how to use git properly and also commands to push to origin. The issue could be either you don't have a repository with the same name in your GitHub account, or your SSH isn't set up. Let me explain in the simplest way to fix this:

  • Open terminal and run ssh-keygen -t ed25519 -C "<[email protected]>"
  • If on windows run type %userprofile%\.ssh\id_ed25519.pub
  • If on Linux or Mac run cat ~/.ssh/id_ed25519.pub
  • Copy the entire output (starts with ssh-ed25519...)
  • Open GitHub and navigate to Settings > SSH and GPG keys or click here
  • Click on New SSH key and paste the output in the input-box.

Now you should be able to use git push…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by connect-24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants