通过自托管的gitlab实例递归gitmodule克隆出现问题

时间:2018-12-15 22:18:26

标签: git ssh gitlab git-submodules

我有一个gitlab实例,该实例自托管在一个Droplet上。

我有一个微服务架构,我正在尝试配置一个父单存储库,以便开发人员可以轻松地提取所有微服务。

所有git操作通常都可以正常运行,但是批量操作往往会失败。无论我是在shell while循环中执行git pull origin master还是git clone --recurse-submodules,如果我在与gitlab实例的每次交互之间都没有添加sleep 5时,它们都会失败。

奇怪的是,这些命令的https变体成功完成而没有问题。

我觉得这与ssh-server有关。递归克隆的输出如下所示:

[~/Documents/src]: git clone --recurse-submodules git@git.redacted.redacted:redacted/main.git
Cloning into 'main'...
remote: Counting objects: 1772, done.
remote: Compressing objects: 100% (854/854), done.
remote: Total 1772 (delta 782), reused 1771 (delta 781)
Receiving objects: 100% (1772/1772), 10.02 MiB | 10.93 MiB/s, done.
Resolving deltas: 100% (782/782), done.
Submodule 'microservices/redacted1' (git@git.redacted.redacted:redacted/redacted1.git) registered for path 'microservices/redacted1'
Submodule 'microservices/redacted2' (git@git.redacted.redacted:redacted/redacted2.git) registered for path 'microservices/redacted2'
Submodule 'microservices/redacted3' (git@git.redacted.redacted:redacted/redacted3.git) registered for path 'microservices/redacted3'
Submodule 'microservices/redacted4' (git@git.redacted.redacted:redacted/redacted4.git) registered for path 'microservices/redacted4'
Submodule 'microservices/redacted5' (git@git.redacted.redacted:redacted/redacted5.git) registered for path 'microservices/redacted5'
Submodule 'microservices/redacted6' (git@git.redacted.redacted:redacted/redacted6.git) registered for path 'microservices/redacted6'
Cloning into '/home/parth/Documents/src/main/microservices/redacted1'...
remote: Counting objects: 315, done.
remote: Compressing objects: 100% (148/148), done.
remote: Total 315 (delta 188), reused 273 (delta 164)
Receiving objects: 100% (315/315), 220.55 KiB | 5.51 MiB/s, done.
Resolving deltas: 100% (188/188), done.
Cloning into '/home/parth/Documents/src/main/microservices/redacted2'...
remote: Counting objects: 105, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 105 (delta 6), reused 13 (delta 6)
Receiving objects: 100% (105/105), 14.05 KiB | 4.68 MiB/s, done.
Resolving deltas: 100% (62/62), done.
Cloning into '/home/parth/Documents/src/main/microservices/redacted3'...
remote: Counting objects: 125, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 125 (delta 78), reused 111 (delta 67)
Receiving objects: 100% (125/125), 16.72 KiB | 1.19 MiB/s, done.
Resolving deltas: 100% (78/78), done.
Cloning into '/home/parth/Documents/src/main/microservices/redacted4'...
remote: Counting objects: 183, done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 183 (delta 86), reused 172 (delta 79)
Receiving objects: 100% (183/183), 2.69 MiB | 10.77 MiB/s, done.
Resolving deltas: 100% (86/86), done.
Cloning into '/home/parth/Documents/src/main/microservices/redacted5'...
ssh: connect to host git.redacted.redacted port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@git.redacted.redacted:redacted/redacted5.git' into submodule path '/home/parth/Documents/src/main/microservices/redacted5' failed
Failed to clone 'microservices/redacted5'. Retry scheduled
Cloning into '/home/parth/Documents/src/main/microservices/redacted6'...
ssh: connect to host git.redacted.redacted port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@git.redacted.redacted:redacted/redacted6.git' into submodule path '/home/parth/Documents/src/main/microservices/redacted6' failed
Failed to clone 'microservices/redacted6'. Retry scheduled
Cloning into '/home/parth/Documents/src/main/microservices/redacted5'...
ssh: connect to host git.redacted.redacted port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@git.redacted.redacted:redacted/redacted5.git' into submodule path '/home/parth/Documents/src/main/microservices/redacted5' failed
Failed to clone 'microservices/redacted5' a second time, aborting

/var/log# tail -f auth.log的输出如下:

root@devops:/var/log# tail -f auth.log
Dec 15 22:03:54 devops sshd[28208]: Invalid user noteb from ##.##.##.##
Dec 15 22:03:54 devops sshd[28208]: input_userauth_request: invalid user noteb [preauth]
Dec 15 22:03:54 devops sshd[28208]: Received disconnect from ##.##.##.## port 59847:11: Bye Bye [preauth]
Dec 15 22:03:54 devops sshd[28208]: Disconnected from ##.##.##.## port 59847 [preauth]
Dec 15 22:04:09 devops sshd[28257]: Accepted publickey for git from ##.##.##.## port 40774 ssh2: RSA SHA256 REDACTED
Dec 15 22:04:09 devops sshd[28257]: pam_unix(sshd:session): session opened for user git by (uid=0)
Dec 15 22:04:09 devops systemd: pam_unix(systemd-user:session): session opened for user git by (uid=0)
Dec 15 22:04:09 devops systemd-logind[1531]: New session 4221 of user git.
Dec 15 22:04:11 devops sshd[28305]: Received disconnect from ##.##.##.## port 40774:11: disconnected by user
Dec 15 22:04:11 devops sshd[28305]: Disconnected from ##.##.##.## port 40774
Dec 15 22:04:11 devops sshd[28257]: pam_unix(sshd:session): session closed for user git
Dec 15 22:04:11 devops systemd-logind[1531]: Removed session 4221.
Dec 15 22:04:11 devops sshd[28332]: Accepted publickey for git from ##.##.##.## port 40784 ssh2: RSA SHA256 REDACTED
Dec 15 22:04:11 devops sshd[28332]: pam_unix(sshd:session): session opened for user git by (uid=0)
Dec 15 22:04:11 devops systemd: pam_unix(systemd-user:session): session opened for user git by (uid=0)
Dec 15 22:04:11 devops systemd-logind[1531]: New session 4222 of user git.
Dec 15 22:04:12 devops sshd[28377]: Received disconnect from ##.##.##.## port 40784:11: disconnected by user
Dec 15 22:04:12 devops sshd[28377]: Disconnected from ##.##.##.## port 40784
Dec 15 22:04:12 devops sshd[28332]: pam_unix(sshd:session): session closed for user git
Dec 15 22:04:12 devops systemd-logind[1531]: Removed session 4222.
Dec 15 22:04:12 devops systemd: pam_unix(systemd-user:session): session closed for user git
Dec 15 22:04:12 devops sshd[28397]: Accepted publickey for git from ##.##.##.## port 40790 ssh2: RSA SHA256 REDACTED
Dec 15 22:04:12 devops sshd[28397]: pam_unix(sshd:session): session opened for user git by (uid=0)
Dec 15 22:04:12 devops systemd: pam_unix(systemd-user:session): session opened for user git by (uid=0)
Dec 15 22:04:12 devops systemd-logind[1531]: New session 4223 of user git.
Dec 15 22:04:12 devops sshd[28443]: Received disconnect from ##.##.##.## port 40790:11: disconnected by user
Dec 15 22:04:12 devops sshd[28443]: Disconnected from ##.##.##.## port 40790
Dec 15 22:04:12 devops sshd[28397]: pam_unix(sshd:session): session closed for user git
Dec 15 22:04:12 devops systemd-logind[1531]: Removed session 4223.
Dec 15 22:04:12 devops systemd: pam_unix(systemd-user:session): session closed for user git
Dec 15 22:04:13 devops sshd[28465]: Accepted publickey for git from ##.##.##.## port 40796 ssh2: RSA SHA256 REDACTED
Dec 15 22:04:13 devops sshd[28465]: pam_unix(sshd:session): session opened for user git by (uid=0)
Dec 15 22:04:13 devops systemd: pam_unix(systemd-user:session): session opened for user git by (uid=0)
Dec 15 22:04:13 devops systemd-logind[1531]: New session 4224 of user git.
Dec 15 22:04:13 devops sshd[28512]: Received disconnect from ##.##.##.## port 40796:11: disconnected by user
Dec 15 22:04:13 devops sshd[28512]: Disconnected from ##.##.##.## port 40796
Dec 15 22:04:13 devops sshd[28465]: pam_unix(sshd:session): session closed for user git
Dec 15 22:04:13 devops systemd-logind[1531]: Removed session 4224.
Dec 15 22:04:13 devops sshd[28541]: Accepted publickey for git from ##.##.##.## port 40798 ssh2: RSA SHA256 REDACTED
Dec 15 22:04:13 devops sshd[28541]: pam_unix(sshd:session): session opened for user git by (uid=0)
Dec 15 22:04:13 devops systemd: pam_unix(systemd-user:session): session opened for user git by (uid=0)
Dec 15 22:04:13 devops systemd-logind[1531]: New session 4225 of user git.
Dec 15 22:04:14 devops sshd[28597]: Received disconnect from ##.##.##.## port 40798:11: disconnected by user
Dec 15 22:04:14 devops sshd[28597]: Disconnected from ##.##.##.## port 40798
Dec 15 22:04:14 devops sshd[28541]: pam_unix(sshd:session): session closed for user git
Dec 15 22:04:14 devops systemd-logind[1531]: Removed session 4225.
Dec 15 22:04:14 devops systemd: pam_unix(systemd-user:session): session closed for user git

从什么地方开始我的google旅程,以正确配置我的服务器和/或客户端有些茫然。

0 个答案:

没有答案