本文介绍了带有非标准端口的GitLab远程存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下错误:
ssh:连接到主机git.limeworks.eu端口22:连接被拒绝
致命:无法从远程存储库读取。
请确保您拥有正确的访问权限
并存在存储库。
现在,我在本地.ssh / config文件中的配置是:
主机limeworks
用户git
端口6565
主机名git.limeworks.eu;
和在远程gitlab.yml中:
gitlab:
## Web服务器设置
主机:git.limeworks.eu
端口:6565
另外,这里是nginx设置(/ sites-enabled / gitlab):
服务器{
听80; #例如,侦听192.168.1.1:80;在大多数情况下*:80是个好主意
server_name git.limeworks.eu; #例如,server_name source.example.com;
...
每次修改后,我都重新启动了gitlab和nginx服务,
编辑:另外值得注意的是远程服务器的sshd_config中的一些片段。 Port 9595
AllowUsers rrw git
解决方案
好的,找到了修正: - 在gitlab.yml中...在高级设置下,有一个选项可以更改默认的ssh port
- 保存并重新启动服务
确保提及的一致性@VonC
I have the following error:
ssh: connect to host git.limeworks.eu port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Now, the configuration I have in my local .ssh/config file is:
host limeworks
user git
port 6565
hostname git.limeworks.eu;
and in the remote gitlab.yml:
gitlab:
## Web server settings
host: git.limeworks.eu
port: 6565
Also, here's the nginx setup (/sites-enabled/gitlab):
server {
listen 80; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
server_name git.limeworks.eu; # e.g., server_name source.example.com;
...
I have restarted the gitlab and nginx services after each modification, yet nothing works!
Edit: Also worth noting here are some snippets from sshd_config of the remote server
Port 9595
AllowUsers rrw git
解决方案
Ok , found the fix:
- in gitlab.yml ... under advanced setting there's an option to change the default ssh port
- save and restart service
Make sure to have the consistency @VonC mentioned
这篇关于带有非标准端口的GitLab远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!