小编luk*_*z21的帖子

在 Windows 终端中的 git 帐户之间切换的简单方法?

有没有一种快速的方法可以在 Windows 上的 cmd 中注销并使用不同的帐户重新登录 git?我试过:

git config --global --unset user.name
git config --global --unset user.mail       
git config --global --unset credential.helper
Run Code Online (Sandbox Code Playgroud)

所以我知道我应该使用 old_user_name 注销?然后我用了:

git config --global user.name "new_user_name"
git config --global user.email "new_email"
git push origin master
Run Code Online (Sandbox Code Playgroud)

我做了一次按摩:

远程:old_user_name 对 new_user_name/new_repo.git 的权限被拒绝。致命:无法访问'https://github.com/new_user_name/new_repo.git/':请求的URL返回错误:403

这意味着我仍然使用旧帐户登录。我还可以做些什么?

windows git logging cmd

2
推荐指数
1
解决办法
677
查看次数

标签 统计

cmd ×1

git ×1

logging ×1

windows ×1