Git on desktop is asking for GitHub password even though I have SSH set up #23582
-
Hello, I’m running into a major issue on a new machine. I’ve followed the GitHub documentation on how to set up an SSH key and have tested it using “ssh -T git@github.com” and get the correct message “Hi novdy! You’ve successfully authenticated, but GitHub does not provide shell access.” But when I try and run “git push -u origin main”, it starts asking for my GitHub credentials. Once entered, it doesn’t accept them since of course, GitHub doesn’t allow password authentication for this anymore. I did not set an SSH passphrase. I wouldn’t imagine an authentication token being necessary. If there is any way you all could help, I’d really appreciate it! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Probably your repository is still configured with HTTPS URLs for the GitHub repository. You can check with:
If you see HTTPS URLs, you can use |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for this! I knew it had to be something simple like this. 🙏 |
Beta Was this translation helpful? Give feedback.
Probably your repository is still configured with HTTPS URLs for the GitHub repository. You can check with:
If you see HTTPS URLs, you can use
git remote set-url
to change them to the matching SSH URLs to make Git use SSH. Otherwise I’m curious what it looks like. 😸