Bash Git推送不';无法在ubuntu子系统中工作(权限被拒绝(公钥))
我最近设置了SSH密钥,以便在使用git时使用它而不是HTTPS。Bash Git推送不';无法在ubuntu子系统中工作(权限被拒绝(公钥)),bash,git,github,Bash,Git,Github,我最近设置了SSH密钥,以便在使用git时使用它而不是HTTPS。 配置完全正常,但现在当我尝试使用时:git-push-origin-master 在ubuntu终端中,它不工作。 我得到一个错误: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and
配置完全正常,但现在当我尝试使用时:git-push-origin-master 在ubuntu终端中,它不工作。
我得到一个错误:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
它在windows power shell和git bash中工作。但我希望它能在ubuntu(设置为windows的子系统)中工作。你也添加了ubuntu公钥吗?(
cat~/.ssh/id_rsa.pub
)您的意思是创建一个新密钥作为第二个ssh密钥?我接着说:我在ubuntubu中运行的所有推荐都是空的,idk为什么这个解决方案解决了我为ubuntu添加的第二个密钥的问题。它需要保存在/home/you/.ssh/id\u rsa中