【发布时间】:2018-04-01 14:23:35
【问题描述】:
我最近用 Vultr 建立了一个 VPS,并建立了一个远程 git 存储库来上传我的项目。
在我将遥控器添加到本地项目并尝试对其进行第一次推送后,它在显示“Total 119 (delta 9), reused 0 (delta 0)”后挂起。
提供一些上下文:
- 服务器是 Ubuntu 17.04 x64 的全新设置
- 我在本地有 git 版本 2.14.1
- 我之前已经在另一个 VPS 上使用 Vultr (Ubuntu 16.04 x64) 完成了此操作,并且一切正常
- 本地 git 项目设置正确,因为我在 BitBucket 上有一个可以成功推送项目的遥控器
- 按照其他类似问题的建议,我已经尝试增加缓冲区大小
- 我正在尝试上传一个新的小型 Laravel 项目 - 没有特殊或大文件(每个文件都小于 1MB)
- 按照其他类似问题的建议,我已将我的 git 版本更新到最新的可用版本(从 2.12 到 2.14)
- 我的 SSH 连接工作正常,我什至设置了调试级别 3,所以它非常冗长(我有下面的日志)
- 远程存储库似乎设置正确(我试图创建一个额外的远程,指向同一服务器上不存在的存储库,使用相同的 SSH 连接,我从 GIT 收到一条正确的错误消息,它找不到回购)
- 我已经设置了带和不带 --shared 的 repo,但结果是一样的
- 我什至等了(超过 8 小时),什么也没发生,没有错误消息,它仍然挂起
- 我已经尝试了 2 天内我能找到的关于这个主题的所有其他解决方案,但我仍然得到相同的结果(甚至重新创建了我的 repo 几次,尝试了不同的名称,为我的 repo 和我的工作目录尝试了 chmod 777服务器等)
这是 git push 上详细的 ssh 输出的一部分(在它验证了 ssh 密钥之后):
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to 45.63.116.43 ([45.63.116.43]:22).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug3: receive packet: type 91
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x08
debug2: client_session2_setup: id 0
debug1: Sending command: git-receive-pack '/var/repo/hc-teaser.git'
debug2: channel 0: request exec confirm 1
debug3: send packet: type 98
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
Counting objects: 119, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (104/104), done.
Writing objects: 100% (119/119), 277.89 KiB | 5.91 MiB/s, done.
Total 119 (delta 9), reused 0 (delta 0)
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug3: send packet: type 96
debug2: channel 0: input drain -> closed
debug2: channel 0: rcvd adjust 65689
在最后一行之后,它只是无限期挂起。
【问题讨论】: