首页 > 解决方案 > git pull/push 无法从/向 github 拉/推,但 git pull/push -vv 可以

问题描述

在我身上发生过几次git push未能推送到 github,而git push -vv可以,例如检查我刚刚运行的以下结果。-vv除了很明显它的输出更冗长之外,我找不到关于的文档。

同样的事情发生在git pull

那为什么?或者这真的只是运气?

ws_redis ➤ git push -v origin v4                                                                             
Pushing to https://github.com/qiulang/ws_redis.git
fatal: unable to access 'https://github.com/qiulang/ws_redis.git/': Failed to connect to github.com port 443: Operation timed out
ws_redis ➤ git push -v origin v4                                                                              
Pushing to https://github.com/qiulang/ws_redis.git
fatal: unable to access 'https://github.com/qiulang/ws_redis.git/': Failed to connect to github.com port 443: Operation timed out
ws_redis ➤ git push -vv origin v4                                                                             
Pushing to https://github.com/qiulang/ws_redis.git
Enumerating objects: 98, done.
Counting objects: 100% (98/98), done.
Delta compression using up to 8 threads
Compressing objects: 100% (84/84), done.
Writing objects: 100% (87/87), 20.73 KiB | 1.22 MiB/s, done.
Total 87 (delta 53), reused 0 (delta 0)
POST git-receive-pack (21396 bytes)
remote: Resolving deltas: 100% (53/53), completed with 8 local objects.
remote: 
remote: Create a pull request for 'v4' on GitHub by visiting:
remote:      https://github.com/qiulang/ws_redis/pull/new/v4
remote: 
To https://github.com/qiulang/ws_redis.git
 * [new branch]      v4 -> v4
updating local tracking ref 'refs/remotes/origin/v4' 

或者

//I run following commands together
lang@localhost qiulang.github.io % git pull --verbose
From https://github.com/qiulang/qiulang.github.io
 = [up to date]      master     -> origin/master
Already up to date.
lang@localhost qiulang.github.io % git pull
fatal: unable to access 'https://github.com/qiulang/qiulang.github.io.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
lang@localhost qiulang.github.io % git pull -vv
From https://github.com/qiulang/qiulang.github.io
 = [up to date]      master     -> origin/master
Already up to date.
lang@localhost qiulang.github.io % git pull
fatal: unable to access 'https://github.com/qiulang/qiulang.github.io.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

或者

ie11 ➤ git push                                                                           
fatal: unable to access 'https://github.com/qiulang/IE11.git/': Error in the HTTP2 framing layer
ie11 ➤ git push -vv                                                                       
Pushing to https://github.com/qiulang/IE11.git
Enumerating objects: 17, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 103.22 KiB | 3.44 MiB/s, done.
Total 9 (delta 7), reused 0 (delta 0), pack-reused 0
POST git-receive-pack (105889 bytes)
remote: Resolving deltas: 100% (7/7), completed with 7 local objects.
remote: 
remote: GitHub found 55 vulnerabilities on qiulang/IE11's default branch (28 high, 18 moderate, 9 low). To find out more, visit:
remote:      https://github.com/qiulang/IE11/security/dependabot
remote: 
To https://github.com/qiulang/IE11.git
   d5fc1ba..f19e160  master -> master
updating local tracking ref 'refs/remotes/origin/master'

标签: gitgithubgit-push

解决方案


推荐阅读