我最近使用Vultr设置了一个VPS,并设置了一个远程git存储库来上传我的项目。
将遥控器添加到我的本地项目并尝试第一次按下它后,它会在显示“Total 119(delta 9),reused 0(delta 0)”后挂起。
提供一些背景信息:
以下是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
在最后一行之后,它会无限期地挂起。
答案 0 :(得分:1)
问题是目标文件夹权限错误。创建目标文件夹时,我使用“ sudo”,因此所有者设置为root。当我将目标文件夹所有者更改为我的用户(用于推送存储库的所有者),并将该组更改为www-data时,一切都像个魅力。
因此,我了解到,当git无法将文件从您的repo移到目标文件夹时,由于它没有适当的授权,它不会显示任何错误报告,只会无限期地等待。< / p>