您需要git update-server-info
在服务器上运行:)
如果存储库是非裸的(即有一个.git
目录),您还需要附加到@Rohit Pothuraju/.git
提到的路径。
你如何调试这样的问题?
我的第一次尝试是从vsftpd中获取详细日志。我阅读了手册并设置了相关选项,但它不起作用(日志为空)。
所以我回过头来拦截 TCP 连接。最原始的方法是让三个终端窗口运行以下命令:
1. nc -v x.x.x.x 21 # connect to the real server
2. nc -l -v -p 1234 # listen on some port
# if it says "This is nc from the netcat-openbsd package", remove the '-p'
3. git clone ftp://localhost:1234/testGit/ testGit
# the program you want to debug, but with the server address replaced
现在,您将在终端 1 中看到来自服务器的消息,在终端 2 中看到来自程序的消息。当您在一个终端中看到消息时,将其复制并粘贴到另一个终端中。继续进行,直到会话结束。
提示:
该-v
标志使 netcat 打印一到两行调试行。确保不要在两个终端之间复制它们!在 1 号航站楼,这应该类似于
localhost [123.0.01] (?) open
在 2 号航站楼,它应该类似于
listening on [any] 1234...
connect to [127.0.0.1] from localhost [1237.0.0.1] 53929
对于某些协议(例如 FTP),服务器会发送第一条消息。一旦程序连接,不要忘记复制该消息,否则它将永远等待。