【发布时间】:2018-07-30 09:31:51
【问题描述】:
我想为 git 使用其他 IdentityFile。我想动态使用它,而不是通过配置。我正在这样做:
$ GIT_SSH_COMMAND='ssh -i /home/my_user/.ssh/id_ed25519' git pull origin master
repository access denied.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
发布密钥“id_ed25519.pub”在我的 bitbucket 中。
这也失败了:
$ git pull origin master
repository access denied.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
还有:
$ git remote -v
origin git@bitbucket.org:company123/repo456.git (fetch)
origin git@bitbucket.org:company123/repo456.git (push)
添加 "-v" 到 'ssh -i /home/my_user/.ssh/id_ed25519' 表明我的 RSA 密钥是正在使用,而不是 ED。为什么?
【问题讨论】:
标签: git ssh public-key-encryption