这两天使用Mac新建立的项目Push到GitHub上得时候报了一个403的异常,如下是我的解决的方法
2:39 PM Can't finish GitHub sharing process
Successfully created project 'spring-cloud' on GitHub, but initial push failed:
unable to access 'https://github.com/Aubergines/spring-cloud.git/': The requested URL returned error: 403
2:44 PM Push failed: Failed with error: unable to access 'https://github.com/Aubergines/spring-cloud.git/': The requested URL returned error: 403
打开到项目的文件夹下的.git/config文件,url中加上Aubergines@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://Aubergines@github.com/Aubergines/spring-cloud.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
解决GitHub403错误
本文分享了在使用Mac将项目推送到GitHub时遇到403错误的解决方案。通过修改.git/config文件中的url,添加用户名,成功解决了Push失败的问题。
1263

被折叠的 条评论
为什么被折叠?



