[英]GitHub multiple keys authentication error despite being logged in?
我在我的 Mac 上设置了多个 GitHub 帐户。 它曾经很好用,直到最近它才停止工作,我不知道为什么。 我的帐户有我的计算机 ssh 密钥,ssh 配置是正确的,我什至登录并验证了通过gh auth
不起作用的帐户。
# ~/.ssh/config
# ...
Host github.com-work
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_work
git config
$ git config --list
credential.helper=osxkeychain
user.email=work-username@work.com
...
remote.origin.url=git@github.com-work:work-username/work-repo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
...
gh auth
$ gh auth status
github.com
✓ Logged in to github.com as work-username (/Users/work-username/.config/gh/hosts.yml)
✓ Git operations for github.com configured to use ssh protocol.
✓ Token: *******************
$ git pull
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
注意:
$ ssh -T -i ~/.ssh/id_rsa_work git@github.com
Hi not-work-username! You've successfully authenticated, but GitHub does not provide shell access.
$ ssh -T -i ~/.ssh/id_rsa_work git@github.com-work
Hi not-work-username! You've successfully authenticated, but GitHub does not provide shell access.
$ ssh -T git@github.com
Hi not-work-username! You've successfully authenticated, but GitHub does not provide shell access.
$ ssh -T git@github.com-work
Hi not-work-username! You've successfully authenticated, but GitHub does not provide shell access.
我做错了什么以及如何让它再次工作?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.