问题描述
我知道这可能是一个转储问题,但是我似乎无法将我的本地提交推送到github中的新帐户回购中。
最近,对于一个学校项目,我在Github @Component({
selector: "otk-specification-responsive",templateUrl: "./specification-responsive.component.html",styleUrls: ["./specification-responsive.component.scss"]
})
export class SpecificationResponsiveComponent extends SpecificationComponent{
constructor(){
super()
}
}
上创建了一个辅助帐户,并创建了一个学校项目存储库。当我运行second_username
时,我在IntelliJ中进行了本地处理。它通常不要求我提供登录凭据。
返回git push origin master
和remote: Permission to second_username/ip.git denied to first_username
。
我尝试将本地和全局用户名以及电子邮件的git配置更改为fatal: unable to access 'https://github.com/second_username/ip.git/': The requested URL returned error: 403
,但一直说我正在尝试以second_username
的身份进行推送。我已经在IntelliJ上的git中进行了所有设置,由于我的原点远程设置为正确的https url,因此似乎是正确的。我怀疑这可能是由于某些登录凭据未更改的缘故,因为我在今天之前使用IntelliJ时一直使用first_username
。
我做错了什么?
解决方法
尝试通过以下方式更改您的帐户:
文件->设置---->版本控制-> GitHub
祝你好运!
,我设法解决了。这与Windows凭据管理器保存了我的其他帐户有关,尽管我设置了配置文件。