如何在同一PC上从头开始返回以及Config GitLab和GitHub帐户?
有了我的大学,我有一个GitLab帐户,但是后来我在Github上创建了自己的帐户以供个人使用,并且两者都在笔记本电脑上“链接”。但是在我看来,这很混乱:两者的联系方式都不同,我有点迷失了自己(一个是用SSH键,另一个是...我不确定),
所以我想完全脱节我的两个帐户,删除SSH键以及从头开始返回的所有内容。我需要做什么?我不想做坏事。然后,如何在笔记本电脑上使用两个帐户(使用SSH键)?
我希望我很清楚
With my University, I have a GitLab account, but later I created my own account on GitHub for my personal use, and both are "linked" on my laptop. But in my mind, it's quite a mess : both are linked differently, and I kinda lose myself (one is with ssh key, the other one is... i'm not sure of it)
So, I want to delink entirely my two accounts, delete the ssh keys and all the things that are needed to return from scratch. What I need to do ? I don't want to make bad things. And then, how can I use both accounts on my laptop (using ssh keys) ?
I hope I was clear
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要有效地“从头开始”,您将需要:
一个。删除您的SSH配置/键
b。删除(全局)git配置
以删除您的本地配置
,默认情况下,您的ssh配置存储在用户配置文件中的
.ssh
目录中。这可能也是存储钥匙的地方。为了有效地“重新开始”,您可以移动(建议您要还原它)或完全删除此目录。您的git配置也是如此,除了
.gitconfig
而不是.ssh
在命令提示/powerShell上的Windows 您可以像这样移动目录主目录):
在MACOS或Linux系统上,您可以执行以下操作:
中删除SSH键
从Gitlab/Github Gitlab
进行gitlab,请导航到 https://gitlab.com/-/profile/keys (如果您使用的是自我固定的gitlab服务器,请替换URL) - 在这里,您可以看到公众的列表SSH键已添加到GitLab中,并通过单击垃圾桶图标来将其删除。
github的github
,导航至 https://github.com/settings/keys/keys/keys - 您会看到您添加的键列表,您可以通过单击“删除”按钮将其删除。
在所有这些操作之间,您将有效地就计算机的GIT配置“从头开始”。
To effectively 'start from scratch' you will need to:
a. Remove your SSH configurations/key
b. Remove your (global) git configuration
Removing your local configurations
Your SSH configuration is, by default, stored in the
.ssh
directory in your user profile. This is probably also where your key(s) are stored. To effectively 'start over' you can move (recommended in case you want to restore it) or delete this directory entirely.Same goes for your git configuration, except this is
.gitconfig
rather than.ssh
On Windows in command prompt/powershell you can move the directory like so (assuming your in your user home directory):
On MacOS or Linux systems, you can do the following:
Removing your SSH keys from GitLab/GitHub
GitLab
For GitLab, navigate to https://gitlab.com/-/profile/keys (replace the URL if you're using a self-hosted gitlab server) -- here you can see a list of your public SSH keys you have added to GitLab and remove them by clicking the trashcan icon.
GitHub
For GitHub, navigate to https://github.com/settings/keys -- you will see a list of keys you have added and you can remove them by clicking the "delete" button.
Between all these actions, you will effectively have "started from scratch" with respect to your computer's git configurations.