修改ssh端口後,gitlab ssh連接不上

錯誤提示:

Pushing to [email protected]:abc/abc.git
ssh: connect to host gitlab-office.wantongtoy.com port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

解決方法

vi /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_shell_ssh_port'] = 2222  #ssh的端口
#重載配置
gitlab-ctl reconfigure

 

推出gitlab 賬戶重新登錄

原來的ssh://[email protected]:/abc/abc.git變成了

ssh://[email protected]:2222/abc/abc.git

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章