我不小心为不存在的用户创建了 kengen。命令是 cat ~/.ssh/authorized_keys >> keydir/jpeck.pub
但实际上......我不是故意这样做的。
我已经使用 rm jpeck.pub
删除了该文件,它肯定已经消失了。但是,当我尝试使用 SourceTree 推送提交时,出现以下错误;
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/master:refs/heads/master
Pushing to ssh://git@sandbox.dev:2222/dashboard.git
W access for dashboard DENIED to jpeck
(Or there may be no repository at the given path. Did you spell it correctly?)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above
下一条消息您的提交成功,但推送失败。要重试推送,请使用“推送”工具栏按钮。
我已经为正确的用户名创建了一个注册机。我看不出我还需要做什么。我尝试过 sudo service apache2 restart 但没有效果。我是安装 git 的初学者,但这也是一个愚蠢的错误 - 我今天很累。
最佳答案
好的,问题解决了。我实际上并没有提交更改并将其推送到 git。这些命令做到了;
git commit -a -m "Adding gitweb permissions"
git push
完成此操作后,我收到一条有关如何在 git 中删除 jpeck keygen 文件的消息。然后,当我尝试使用 SourceTree 时,和以前一样,它没有错误。
关于linux - 如何删除用户的 ssh keygen?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28418023/