Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自定义SSH端口上的Gitlab_Git_Ssh_Gitlab - Fatal编程技术网

自定义SSH端口上的Gitlab

自定义SSH端口上的Gitlab,git,ssh,gitlab,Git,Ssh,Gitlab,我已尝试安装Gitlab,但无法输入自定义SSH端口 已经将gitlab.yml中的端口设置为我的自定义端口,并创建了该文件 /home/gitlab/gitlab/.ssh/config 我的财产: Host localhost Port 100001 如上所述 但测试时仍显示以下消息: bundle exec rake gitlab:app:status RAILS_ENV=production Starting diagnostic config/database.yml.......

我已尝试安装Gitlab,但无法输入自定义SSH端口

已经将gitlab.yml中的端口设置为我的自定义端口,并创建了该文件

/home/gitlab/gitlab/.ssh/config
我的财产:

Host localhost
Port 100001
如上所述

但测试时仍显示以下消息:

bundle exec rake gitlab:app:status RAILS_ENV=production
Starting diagnostic
config/database.yml............exists
config/gitlab.yml............exists
/home/git/repositories/............exists
/home/git/repositories/ is writable?............YES
ssh: connect to host localhost port 22: Connection refused
fatal: The remote end hung up unexpectedly
Can clone gitolite-admin?............YES
UMASK for .gitolite.rc is 0007? ............YES
/home/git/.gitolite/hooks/common/post-receive exists? ............YES

Finished
我不能在Gitlab中添加我的公共ssh密钥,它说“Gitlab无法访问您的Gitolite系统。”


有人能帮忙吗?

您至少有两个问题

配置文件的正确路径是/home/gitlab/.ssh/config


无法使用端口100001,因为它不存在。端口范围从1到65535,我建议您使用9000以上的端口。

/home/gitlab/.ssh/config存在,并使用“localhost”作为主机,使用正确的ssh端口作为“port”。我只是不想把我的港口寄到这里。谢谢,但问题仍然存在。请尝试检查您是否确实正确设置了ssh。成为gitlab用户(可能是[#sudo su-s/bin/bash gitlab]),并检查您的ssh配置是否有效:[#ssh]git@localhost]. 如果您连接到gitolite,那么您的.ssh/config一切正常,问题出在gitlab上。