git push error: 403
我今天在把本地仓库push到远程仓库的时候,出现了问题:一会儿是这个:fatal: unable to access 'https://github.com/***/***/': OpenSSL SSL_read: Connection was reset, errno 10054一会儿又变成了这个:remote: Permission to Dxuan-chen/huashan.git deni
·
我今天在把本地仓库push到远程仓库的时候,出现了问题:
一会儿是这个:
fatal: unable to access 'https://github.com/***/***/': OpenSSL SSL_read: Connection was reset, errno 10054
一会儿又变成了这个:
remote: Permission to Dxuan-chen/huashan.git denied to xuanfchen.
fatal: unable to access 'https://github.com/Dxuan-chen/huashan.git/': The requested URL returned error: 403
查了网上的修改hosts文件,关防火墙,文件没有commit到本地仓库里,关代理,关热点等方法。
最后终于找到了解决的办法。
在创建远程库地址别名的时候,我们的远程库地址是这样子的:
https://github.com/***/***.git
只需要添加上github
名字和密码就行了。即:
https://名字:密码@github.com/***/***.git
1.可以直接到.git目录下的config文件修改 URL这一行
2.也可以直接在bash里重新设置:
git remote set-url origin <new url>
最后,再push一下就可以了。^_^
更多推荐
已为社区贡献2条内容
所有评论(0)