How to change GitHub account on TortoiseGit

柔情痞子 提交于 2020-01-02 04:39:07

问题


I am going to change GitHub account on TortoiseGit because the current account doesn't have the permission to push.

error:[remote:Permission to (repository) denied to (GitHub account)]

Can any methods change the GitHub account on TortoiseGit?


回答1:


I suppose you enabled a git credential helper and stored the credentials. You have to delete them manually using the windows credential manager, see https://stackoverflow.com/a/31782500/3906760. After that you will be asked again and can use a different account.




回答2:


I know it is late but some may find the below information useful.

You need to open the .git folder (it is hidden folder, enable show hidden folders option first) then config file within it.

There you can see many properties like [core], [remote], [origin].

Now you need to create property like [credential].

[credential]
   username = your-account-username
[user]
   name = your name
   email = your email address

if any of the property is already present, replace it with your required account detail.

That's it, now when you commit or push again, it will ask for the password of the account details you have entered in config file.



来源:https://stackoverflow.com/questions/36865486/how-to-change-github-account-on-tortoisegit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!