TortoiseGit使用不正确的SSH密钥 [英] TortoiseGit using incorrect SSH key
问题描述
错误:授权给martindevans / Hermes.git拒绝key2
Key2是我用来访问不同的github版本库的一个密钥,但是远程url没有设置为使用key2,正如你在这里看到的那样设置为使用private.ppk
我是否做了明显错误的事情,还是乌龟git坏了?
铌。回应评论。使用普通的git结果:
C:\ Users \Martin\Documents\Visual Studio 2010\Projects\\ \\ Hermes> git push
权限被拒绝(publickey)。
fatal:远程终端意外挂起
有不同的私钥格式。我的密钥对是用puttygen生成的,但我的Tortoise被配置为使用ssh.exe(形式为msysgit)作为ssh-client。所以我把它改成了plink(来自Tortoise),它工作。
$ b $ ul
其他注意事项:请使用正确的网址! Github为您提供三个URL https,git和ssh。
编辑:
我在这里调整了设置:
设置 - TortoiseGit>>网络>> SSH客户端
C:\程序文件\TortoiseGit\bin\TortoisePLink.exe
我已经生成密钥对:
C:\程序文件\\TortoiseGit\bin\puttygen.exe
I have a strange problem with tortoise git at the moment, which I can't figure out. When trying to commit to my repository on github I get the error
ERROR: Permission to martindevans/Hermes.git denied to key2
Key2 is a key I use to access a different github repository, however the remote url is not set to use key2, as you can see here it's set to use private.ppk
Am I doing something obviously wrong, or is tortoise git broken?
Nb. In response to the comments. Using normal git results in:
C:\Users\Martin\Documents\Visual Studio 2010\Projects\Hermes>git push
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
There are different private key formats. My keypair was generated with puttygen, but my Tortoise was configured to use ssh.exe (form msysgit) as ssh-client. So i changed it to plink (from Tortoise) and it worked.
- ssh-key.exe => ssh.exe (C:\msysgit\msysgit\bin)
- puttygen.exe => TortoisePlink.exe (C:\Program Files\TortoiseGit\bin)
Additional note: Use the correct URL! Github offers you three URL https, git and ssh.
Edit:
I adapted the settings here:
Settings - TortoiseGit >> Network >> SSH-Client
C:\Program Files\TortoiseGit\bin\TortoisePLink.exe
I have generated the key-pair with:
C:\Program Files\TortoiseGit\bin\puttygen.exe
这篇关于TortoiseGit使用不正确的SSH密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!