error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error

欢迎访问我的个人博客网站:http://www.yanmin99.com/

error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
  • 错误信息如下:

    yanmin:notes yanmin$ git push origin master
    Counting objects: 42, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (42/42), done.
    Writing objects: 100% (42/42), 1.22 MiB | 0 bytes/s, done.
    Total 42 (delta 23), reused 0 (delta 0)
    error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
    fatal: The remote end hung up unexpectedly
    fatal: The remote end hung up unexpectedly
    • 原因分析:

      • 我这边这个原因是这次push的内容过大
    • 解决方案:

      • 1、我的解决方案是强制推送

        yanmin:notes yanmin$ git push -u origin master -f
        Counting objects: 42, done.
        Delta compression using up to 8 threads.
        Compressing objects: 100% (42/42), done.
        Writing objects: 100% (42/42), 1.22 MiB | 0 bytes/s, done.
        Total 42 (delta 23), reused 0 (delta 0)
        To git@git.yanminhaoren.com:gitbook/notes.git
          452afa2..09a9ae4  master -> master
        Branch master set up to track remote branch master from origin
      • 2、我这边用的http协议,你可以换成ssh协议,也能解决这个问题。

        git remote set-url origin git@git.xxx.com:gitbook/notes.git

你可能感兴趣的:(git,git)