大网数据广告活动
服务器运维问答

gitlab ssh access connection refused

· 52CE 我爱测

I'm trying to access gitlab with my account in SSH with public key authentication. I have uploaded my public key and here is my SSH configuration: content of /home/$my_user/.ssh/config Host gitlab User git Port 22 Hostname gitlab…

问题原文

原帖链接 · philippe · CC BY-SA 3.0

I'm trying to access gitlab with my account in SSH with public key authentication. I have uploaded my public key and here is my SSH configuration:

content of /home/$my_user/.ssh/config
Host gitlab
User git
Port 22
Hostname gitlab.$my_domain
IdentityFile /home/$my_user/.ssh/id_rsa
IdentitiesOnly yes

Here is the command I tiped:

mkdir $my_project
cd $my_project
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin gitlab:$my_user/$my_project.git
git push -u origin master

Here is the sshd log file: auth.log

Here is the stack on client side: client stack

As I am authenticated, and my key correctly loaded from ~git/.ssh/authorized_keys, I presume the trouble comes from the client side. But I cannot determine where the issue comes from and neither how to fix it.

Many thanks for your help; Don't hesitate to ask for more details if you need to.

EDIT: here is the output of ssh -v git@gitlab

已采纳解答

原帖链接 · sciurus · CC BY-SA 4.0

The gitlab shell, which is invoked by your SSH login, needs to make a call to the API of the gitlab web application to determine if you're authorized to push. However, it can't connect to it. Run the appropriate rake task for your version of gitlab to check the configuration of all the gitlab components and fix any errors it finds.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-04-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。