如何删除用户的 ssh keygen?

How do I delete ssh keygen for user?

我不小心为一个不存在的用户创建了一个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

下一条消息Your commit succeeded but your push failed. To retry your push, use the Push toolbar button.

我已经为正确的用户名创建了一个注册机。而且我看不出我还需要做什么。我已经尝试 sudo service apache2 restart 但没有效果。我是安装 git 的初学者,但犯了一个愚蠢的错误 - 我今天很累。

好的,问题解决了。我实际上并没有提交并将更改推送到 git。这些命令做到了;

git commit -a -m "Adding gitweb permissions"
git push

执行此操作后,我收到一条消息,说明如何在 git 中删除了 jpeck 注册机文件。然后,当我像以前一样尝试使用 SourceTree 时,它​​没有任何错误。