github如何在我的Mac上删除旧的ssh密钥? [英] github how to delete old ssh key on my mac?
问题描述
我最近购买了一个用于开发的二手Mac,但是当我尝试将代码从我的Mac推送到我的github存储库时.我将收到此错误:例如,我/testuser.git的权限被拒绝给oldmacowner.
Hi I recently purchased a used mac for development, however when I try to push code from my mac to my github repository. I will be getting this error:Permission to myself/testuser.git denied to oldmacowner for example.
我想知道如何解决这个问题.我想我需要删除属于oldmacuser的旧ssh密钥,并从github设置一个新的ssh密钥.任何人都知道如何去做吗?谢谢.
I am wondering how to go about this. I think I need to delete the old ssh key that belongs to the oldmacuser and set up a new ssh key from github. Anyone have an idea of how to go about it? Thanks.
推荐答案
我要做的是-
打开终端
cd ~/.ssh
open .
然后在finder中打开文件夹,然后删除了id _ ***.pub(SSH密钥文件).然后按照以下说明进行操作-
Then folder opened in finder then i removed id_***.pub (SSH key files). Then followed following instructions -
- 在Finder中,搜索钥匙串访问"应用.
- 在钥匙串访问"中,搜索github.com.
- 钥匙串中的GitHub密码条目查找github.com的互联网密码"条目.
-
相应地编辑或删除条目.
- In Finder, search for the Keychain Access app.
- In Keychain Access, search for github.com.
- GitHub Password Entry in KeychainFind the "internet password" entry for github.com.
Edit or delete the entry accordingly.
https://help.github.com/articles/updating-credentials-from-the-osx-keychain/
希望有帮助!
这篇关于github如何在我的Mac上删除旧的ssh密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!