0

I have created a deploy key according to the windows instructions here

But instead of using the deploy key that has just been set up, git push instead asks for credentials, first with a pop up, then with an SSH pop up, then in the git bash command line itself! This is quite shocking because the whole purpose of a deploy key is to avoid having to provide access to an entire github account

Given I have followed github's own instructions precisely and this isn't working, I am lost as to what to do next.

Notes

  • Some time ago, somehow, I set up a deploy key successfully on the same (windows) server. So perhaps the > 1 key on the machine is confusing some part of the process. I am not sure this has anything to do with it though.

  • I can see here that github expects keys to be named id_rsa and id_rsa.pub, but given this is my second deploy key running on this particular server, I named the second set differently so as to avoid overwriting the original set (the original set are still there, there are just two more files in C:\Users\[YOUR-USER-NAME]\.ssh\)

Community
  • 1
  • 1
stevec
  • 41,291
  • 27
  • 223
  • 311
  • Is your remote SSH or HTTPS? You can check with `git remote -v`. – bk2204 Oct 17 '19 at 01:12
  • @bk2204 great idea. I checked and it returned the HTTP remote. So I updated the remote to SSH and now `git remote -v` returns `origin git@github.com:stevecondylios/cran-libraries.git (fetch) origin git@github.com:stevecondylios/cran-libraries.git (push)` – stevec Oct 17 '19 at 02:24
  • @bk2204 I now see [this](https://stackoverflow.com/questions/58416318/how-to-push-to-github-using-deploy-key-on-windows) error message when I try to `git push` – stevec Oct 17 '19 at 02:25
  • @bk2204 I have found some related info [here](https://gist.github.com/adamjohnson/5682757) but am still not exactly sure what to try, and also do not want to accidentally break the original (working) deploy key – stevec Oct 17 '19 at 05:47
  • After a LOT of googling, I got it sorted. Github user 'NickWoodham' comment [here](https://gist.github.com/jamesmcfadden/d379e04e7ae2861414886af189ec59e5) is what I used - seems to work well – stevec Oct 17 '19 at 08:49

0 Answers0