我有两个git ID("theNameBeforeIUsed","correctName"),我想要更改我的会话。
所以我输入了,$ git config user.email correctmail@email.com $ git config --global user.email correctmail@email.com $ git config user.name "correctName" $ git config --global user.name "correctName" $ git push origin master
但是,remote: Permission to ~~~.git denied to theNameBeforeIUsed. fatal: unable to access '~~~.git/': The requested URL returned error: 403出现权限错误
如何注销"theNameBeforeIUsed“并使用"correctName”登录?
发布于 2017-06-29 13:25:01
可能在克隆存储库时,您使用的theNameBeforeIUsed@yourgit.com:proyect.git如下所示
因此,如果您在连接到git时更改用户,它将使用theNameBeforeIUsed代替新用户,那么您需要更改.git/config文件
在哪里写着
[remote "origin"]
url = theNameBeforeIUsed@yourgit.com:project.git使用您的项目的https版本或在那里更改您的用户,我个人更喜欢https,因为它更安全,并且总是询问您的用户以避免误解
https://stackoverflow.com/questions/44816854
复制相似问题