Gitlab: can't SSH from home (Windows)

泄露秘密 提交于 2019-12-06 12:52:18
VonC

SSH works fine for BitBucket on the same machine SSH key has been added and is correct

I hope it isn't the same ssh key which has been added to GitLab, but a different public one (for a corresponding different private ssh key)

In that case, you would need an ~/.sssh/config referencing both public keys, as in "How to set up two SSH keys for two GitLab accounts and push/pull by using TortoiseGit?":

# my primary account for BitBucket
Host bitbucket
    User git
    HostName bitbucket.com
    PreferredAuthentications publickey
    IdentityFile C:/Users/{username}/.ssh/id_rsa1

# for GitLab server
Host gserver
    User git
    HostName {server}
    PreferredAuthentications publickey
    IdentityFile C:/Users/{username}/.ssh/id_rsa2

In the meantime, check the output of:

ssh -Tvv gserver

(with 'gserver' being the entry of the .ssh/config file, which references the right private ssh key, and the user 'git')

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!