如何删除用户的ssh keygen?

时间:2020-12-13 09:17:18

I have accidentally created a kengen for a user that does not exist. The command was cat ~/.ssh/authorized_keys >> keydir/jpeck.pub but actually... I didn't mean to do that.

我不小心为不存在的用户创建了一个kengen。命令是cat~ / .ssh / authorized_keys >> keydir / jpeck.pub但实际上......我不是故意这样做的。

I have already deleted the file using rm jpeck.pub and it is certainly gone. However, when I try to push a commit using SourceTree I get the following error;

我已经使用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

The next message Your commit succeeded but your push failed. To retry your push, use the Push toolbar button.

下一条消息您的提交成功但推送失败。要重试推送,请使用“推送”工具栏按钮。

I have created a keygen for the CORRECT username. And I can't see what else I need to do.. I have tried sudo service apache2 restart but that had no effect. I am a beginner with installing git but also it was a silly mistake to make - I am very tired today.

我已经为CORRECT用户名创建了一个keygen。我无法看到我还需要做什么..我已经尝试过sudo service apache2 restart但是没有效果。我是一个安装git的初学者,但这也是一个愚蠢的错误 - 我今天很累。

1 个解决方案

#1


0  

Ok, problem solved. I hadn't actually committed and pushed the changes to git. These commands did it;

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

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

Once I did that, I got a message about how the jpeck keygen file had been deleted in git. Then when I tried to use SourceTree, as before, it worked with no errors.

一旦我这样做,我收到一条关于如何在git中删除jpeck keygen文件的消息。然后,当我像以前一样尝试使用SourceTree时,它没有任何错误。

#1


0  

Ok, problem solved. I hadn't actually committed and pushed the changes to git. These commands did it;

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

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

Once I did that, I got a message about how the jpeck keygen file had been deleted in git. Then when I tried to use SourceTree, as before, it worked with no errors.

一旦我这样做,我收到一条关于如何在git中删除jpeck keygen文件的消息。然后,当我像以前一样尝试使用SourceTree时,它没有任何错误。