【问题标题】:Git remote not working after sysprepping server系统准备服务器后 Git 远程无法工作
【发布时间】:2012-04-30 19:23:07
【问题描述】:

所以,长话短说,我不小心 sysprep 了我的开发服务器,而不是我正在处理的 vm(我知道,打开了太多 rdp 窗口并且由于新生儿而剥夺了睡眠)。

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

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

这是我从 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>

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

【问题讨论】:

  • /var/log/secure的服务器端有日志吗?
  • 我在日志中没有安全子文件夹。日志中唯一的其他文件很旧。
  • 啊,正在记录到 Windows 事件日志。 “致命:initgroups:git:无效参数”
  • mail-archive.com/cygwin@cygwin.com/msg82987.html 一样吗? “查看/etc/passwd 我看到myidgid,应该是/etc/group 中列出的“Domain Users”的数字,是一个不同的数字。将正确的gid 放入/etc/passwd解决了这个问题。”
  • 这不是问题,但我现在已经解决了。问题是 sysprep 创建了新的机器 ID,所以我所有的本地 Windows sid 在 /etc/passwd 和 /etc/group 中都是错误的。解决这些问题可以解决问题

标签: windows ssh gitolite openssh


【解决方案1】:

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

OP Ian1971cmets:

问题是 sysprep 创建了新的机器 ID,所以我所有的本地 Windows sid 在 /etc/passwd/etc/group 中都是错误的。

【讨论】:

    猜你喜欢
    • 2019-10-05
    • 1970-01-01
    • 1970-01-01
    • 2023-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-10
    • 2011-10-17
    相关资源
    最近更新 更多