windows - 系统准备服务器后 Git 远程不工作

标签 windows ssh gitolite openssh

所以,长话短说,我不小心系统准备了我的开发服务器,而不是我正在使用的虚拟机(我知道,打开了太多的 rdp 窗口,并且由于新生儿而剥夺了 sleep )。

开发服务器工作正常,我将机器名称改回原来的名称并重新分配了旧的 IP 地址。服务器上的其他一切似乎都可以工作,但我无法再远程连接到 git。我认为它与 gitolite 或 ssh 相关。

git clone 给我: 连接由 192.168.10.20 关闭 fatal: 远端意外挂断

这是我从 ssh -v 得到的

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to myserver [<serveripaddress>] port 22.
debug1: Connection established.
debug1: identity file /c/Users/me/.ssh/identity type -1
debug1: identity file /c/Users/me/.ssh/id_rsa type 1
debug1: identity file /c/Users/me/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8
debug1: match: OpenSSH_5.8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'myserver' is known and matches the RSA host key.
debug1: Found key in /c/Users/me/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/me/.ssh/identity
debug1: Offering public key: /c/Users/me/.ssh/id_rsa
Connection closed by <serveripaddress>

非常感谢任何解决此问题的想法。

最佳答案

有点像“Re: sshd: PID xxxx: fatal: initgroups: myid: Invalid argument.”,问题在于 /etc/passwd/etc/group 的用户 SID 错误(这里 ' git')

OP Ian1971评论:

The problem was that sysprep creates new machine ids so all my local Windows sids were wrong in /etc/passwd and /etc/group.

关于windows - 系统准备服务器后 Git 远程不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10356691/

相关文章:

c++ - BitBlt 忽略 CAPTUREBLT 并且似乎总是捕获目标的缓存拷贝

linux - 使用 Bash 脚本自动插入密码

ubuntu - screen -S <name> 在 ssh session 中给出 "Cannot exec ' usr/bin/bash'"

在 Windows 中使用 PuTTY SSH 到 Amazon EC2 实例

git - 没有共同的引用,也没有指定;什么也不做

windows - 使用 Chef 的多个 tomcat 实例

c++ - 在 WIndows 8.1 中捕获 PC 的整个屏幕截图

eclipse - 如何使用 Egit 克隆创建 Eclipse 项目

apache - Cgit 中的访问控制

c++ - 使用 dll 中的类时内存无效