37

I just created a Wiki for a Github repo, and cloned it to my desktop. There is only the option to clone using https, which means every time I try to push git asks me for my username and password.

Is there some way to use SSH in a Github Wiki as I do with all my standard repos?

I checked the Wiki help but couldn't find anything there.


I' using 2FA in Github by the way.

Gabriel
  • 40,504
  • 73
  • 230
  • 404

1 Answers1

62

You can also clone wiki via ssh :

git clone git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
Bertrand Martel
  • 42,756
  • 16
  • 135
  • 159
  • 10
    Thank you Bertrand! That was easier than I thought. Not sure why Github does not show that option along with `https`? – Gabriel Feb 27 '17 at 18:46
  • 1
    Shouldn't it be `git clone ssh://git@github.com/[YOUR_USERNAME_OR_ORGANIZATION]/[YOUR_REPO].wiki.git`? I edited the original answer to be that now. – program247365 Dec 08 '17 at 14:53
  • 1
    honestly, `ssh://` is optional, but the url must be of the form `git@github.com:org/repo.wiki.git` – ThatsAMorais Feb 01 '18 at 21:04
  • 2
    FWIW, the git clone command fails for me unless I include the ssh. The following was the only thing that worked for me: `ssh://git@github.com/[YOUR_USERNAME_OR_ORGANIZATION]/[YOUR_REPO].wiki.git` – LaFayette Aug 21 '19 at 20:20
  • 1
    the option without ssh:// works for me, the one with ssh:// doesn't. But the problem is that even after cloning through ssh I am still asked for my login and pwd every time. My public ssh key is registered on github, and so that is not the problem. Any thoughts on what i might be doing wrong? – Ricardo Pietrobon Feb 12 '20 at 08:30
  • @RicardoPietrobon that's because on github site displays https, not ssh, here explanation: https://stackoverflow.com/questions/40945548/how-to-push-to-github-wiki-without-username-and-password – Ivan Frolov Mar 08 '21 at 08:14