在终端中更改github帐户

mklgxw1f  于 2023-01-28  发布在  Git
关注(0)|答案(2)|浏览(199)

如何在终端In the image you can see dhamo2002 which is not my account. i have no idea how this account get connected that is my brother account中更改github帐户
我已经尝试了很多次使用git config和ssh key方法,但是没有效果。
所有我需要的是我需要连接我的github帐户'yuvaraj 787'在'dhamo 2002'的地方。我是新的git和github。这将是很好的,如果有人明白我在说什么,并帮助。谢谢!

zf9nrax1

zf9nrax11#

一些有用的命令:

git config --global --get user.email
git config --global --get user.name
git config --global --get-all

但要回答你的问题

git config --global --unset user.email
git config --global --unset user.name

将删除当前配置文件。
&

git config --global --add user.email youremail123@gmail.com
git config --global --add user.name YOURUSERNAME123

将得到您的 * 实际 * 配置文件设置:)

为了让你走完剩下的路:

git config --global --help

hint: have your personal access token (PAT) handy for reconfiguring your profile to your shell
brvekthn

brvekthn2#

GitHub的官方Managing multiple accounts应该会有所帮助。
在[使用HTTPS和个人访问令牌向多个帐户投稿](使用HTTPS和个人访问令牌向多个帐户投稿)部分中,您可以了解如何
通过配置Git为每个存储库存储不同的凭据,为每个帐户使用不同的个人访问令牌。
本节还介绍了如何清除当前凭据。

相关问题