最奇怪的事情。升级到 Fedora 33 后,git
fetch
、push
和pull
命令速度很慢。
我已经能够使用以下命令获取一些跟踪和调试信息:
GIT_SSH_COMMAND="ssh -vvv" GIT_TRACE=1 git fetch 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }'
...所以它将像这样的信息附加到标准输出...
GIT_SSH_COMMAND="ssh -vvv" GIT_TRACE=1 git fetch 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }'
[2020-11-25 19:14:01] 19:14:01.239274 git.c:444 trace: built-in: git fetch
[2020-11-25 19:14:01] 19:14:01.240644 run-command.c:663 trace: run_command: unset GIT_PREFIX; GIT_PROTOCOL=version=2 'ssh -vvv' -o SendEnv=GIT_PROTOCOL [email protected] 'git-upload-pack '\''thomasmatecki/dots.git'\'''
[2020-11-25 19:14:01] OpenSSH_8.4p1, OpenSSL 1.1.1h FIPS 22 Sep 2020
[2020-11-25 19:14:01] debug1: Reading configuration data /home/thomas/.ssh/config
...
[2020-11-25 19:14:01] debug2: resolving "github.com" port 22
[2020-11-25 19:16:16] debug2: ssh_connect_direct
[2020-11-25 19:16:16] debug1: Connecting to github.com [140.82.114.4] port 22.
[2020-11-25 19:16:16] debug1: Connection established.
...
...整整两分钟后就完成了。太长了。请注意,该resolving "github.com" port 22
步骤需要整整 2 分钟。
我不知道下一步该做什么。如何进一步解决这个问题?