我已经开始尝试使用git和github。我创建了一个存储库,我试图发布。我得到类似如下的错误:Git似乎卡在我的旧帐户
$ git push origin master ERROR: Permission to myuser/MyProject.git denied to OldAccount. fatal: could not read from remote repository Please make sure you have the correct access rights and the repository exists
让我吃惊的是,混帐以为我是OldAccount
。那是我一年前在第一次使用git时创建的用户名。我今天决定创建一个新帐户,并试图使用我的新帐户,但git不断尝试使用我的旧帐户进行发布。我正在使用GitHub for Windows应用程序,并且它绝对登录到我的新的帐户。那么OldAccount
怎么还在弹出呢?
运行'git的远程-v'产生的URL'[email protected]:mynewuseraccount/MyRepo.git'。我运行了'git config user.email',并显示正确的电子邮件地址。 – FrustratedWithFormsDesigner
您发布的链接建议我运行'git config --global --edit'并验证用户和电子邮件。我运行了该命令,并从旧用户帐户的最近存储库列表中看到旧存储库。一旦我摆脱那些我能够发布变化。 – FrustratedWithFormsDesigner