首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git推送用户id未更改

git推送用户id未更改
EN

Stack Overflow用户
提问于 2017-06-29 13:16:24
回答 1查看 534关注 0票数 0

我有两个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”登录?

EN

回答 1

Stack Overflow用户

发布于 2017-06-29 13:25:01

可能在克隆存储库时,您使用的theNameBeforeIUsed@yourgit.com:proyect.git如下所示

因此,如果您在连接到git时更改用户,它将使用theNameBeforeIUsed代替新用户,那么您需要更改.git/config文件

在哪里写着

代码语言:javascript
复制
[remote "origin"]
    url = theNameBeforeIUsed@yourgit.com:project.git

使用您的项目的https版本或在那里更改您的用户,我个人更喜欢https,因为它更安全,并且总是询问您的用户以避免误解

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44816854

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档