问题描述
请在gitlab(public_rsa)上添加一个ssh密钥。
我的问题是,当我尝试在存储库中推送分支时,仍然要求我提供gitlab密码和密码。我的理解是,在设置了此SSH密钥后,我将不再需要这样做。
ssh-keygen -t rsa -b 4096 -C "[email protected]" -f $HOME/.ssh/id_rsa_specific
如果有人可以提供解释,我将不胜感激。 告诉我我是否不清楚。
谢谢。
解决方法
我看到您列出了生成rsa密钥的命令。您没有提到是否将该密钥放在Gitlab或其中。
我首先要仔细检查您是否已将$HOME/.ssh/id_rsa_specific
的内容复制并粘贴到Gitlab帐户设置>> ssh密钥中。
https://docs.gitlab.com/ee/ssh/#adding-an-ssh-key-to-your-gitlab-account
然后我将尝试通过在终端中运行以下命令来检查ssh密钥:
ssh -T [email protected]
https://docs.gitlab.com/ee/ssh/#testing-that-everything-is-set-up-correctly