git push 失败与解决方法汇总

  • Post author:
  • Post category:其他



1.http链接失败:



现象:


  1. “Permission denied (publickey).
  2. fatal the remote hang up unexpectly


原因:http链接失败


解决方法:


1)生成ssh密钥


2)然后将公钥拷贝到gitup配置之中。


“Account Settings” > Click “SSH Public Keys” > Click “Add another public key”



3)修改本地配置

  1. edit


    .git/config


    file under your repo directory
  2. find


    url=


    entry under section


    [remote “origin”]

  3. change it from


    url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git


    to


    url=ssh://git@github.com/derekerdmann/lunch_call.git


    . that is, change all the texts before


    @


    symbol to


    ssh://git

  4. Save


    config


    file and quit. now you could use


    git push origin master


    to sync your repo on GitHub



参考:

http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed/9575906#9575906




版权声明:本文为trochiluses原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。