git push显示 returning Error Code 403 fatal: HTTP request failed

编辑.git/config

  1 [core]
  2         repositoryformatversion = 0
  3         filemode = true
  4         bare = false
  5         logallrefupdates = true
  6 [remote "origin"]
  7         url = https://github.com/yourusername/repository_name.git
  8         url = ssh://git@github.com/yourusername/repository_name.git
  9         fetch = +refs/heads/*:refs/remotes/origin/*        
 10 [branch "master"]
 11         remote = origin
 12         merge = refs/heads/master
 13 [http]  
 14 [https] 

第7行是原来的,把它修改成第8行,使用ssh传输。同时要确保现在使用的git的email在github上已验证即可

你可能感兴趣的:(git)