Debian9 gogs 导致SSH 登录失败的解决的原因
1, 前言
装了gogs, 配好了SSH, 我是装在root用户下的.
然后在客户端用root直接 ssh 登录, 同时客户端还有用户tester
在tester 用户下获取到 id_rsa.pub (cat /home/tester/.ssh./id_rsa.pub) 后, 在gogs 里面加入 SSH key. 然后执行
ssh -T root@git.xxx.xxx
提示
Hi there, You've successfully authenticated, but Gogs does not provide shell access.
If this is unexpected, please log in with password and setup Gogs under another user.
说明gogs的 SSH 验证通过, 这样就可以拉代码了.
2, 问题
把客户端 root 的公钥也加入到 gogs 的SSH key, 执行
ssh -T root@git.xxx.xxx
提示
Linux xxx 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64
Welcome to xxx !
在客户端root下拉取仓库代码, 提示路径不对
Cloning into 'test_project'...
fatal: '/test_git/test_project.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure


247

被折叠的 条评论
为什么被折叠?



