push项目到GitHub失败
程序员文章站
2022-05-29 22:25:40
...
这两天使用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
中加上[email protected]
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://[email protected]/Aubergines/spring-cloud.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master