如题,我在官网看到了nginx的代理设置,我想知道要怎么配置url,才能消除掉ssh链接中的端口?
现在的情况是配置了根域名和ssh根域名后,还是会出现 git.example.com:2222
的链接。我想实现ssh的链接里面没有端口
如题,我在官网看到了nginx的代理设置,我想知道要怎么配置url,才能消除掉ssh链接中的端口?
现在的情况是配置了根域名和ssh根域名后,还是会出现 git.example.com:2222
的链接。我想实现ssh的链接里面没有端口
See config cheat sheet, under [server]
there is probably SSH_PORT = 2222
. You can remove line or set to default SSH_PORT = 2222
SSH_PORT = 22
.
my gitea is installed by docker, -p 2222:22
, Will deleting this cause ssh to become invalid?
I can’t set it to 22:22 since linux_ssh will use this port
I try to delete SSH_PORT = 2222
,and the port disappeared. Then I set-url & git push,it ask me to enter git@git.example.com
passwd. Is this a normal phenomenon?
$ git push
git@git.example.com's password:
the passwd isn’t my gitea account passwd.If I enter gitea passwd, it will show
Permission denied, please try again.
gitea是docker安装的,将2222端口映射给了docker的22端口。删掉了SSH_PORT = 2222
后,设置了本地git的url,git push让我输入密码。感觉ssh应该不需要输入密码才对。
ssh key是有配置的。如果带上端口是能直接推送上去的。这里的密码不是我gitea账户的密码,不太了解是啥情况。
是我哪里配置的不对吗?
找到问题了,我应该给url添加上ssh://
然后又出现了第二个问题,现在提示我没有权限
PS:重新测试过了,带上端口是能正常push的
Sorry, I use Google Translate and it is unclear on last sentence. Is git push
working?
Permission denied, please try again.
If -p 2222:22
set, git@git.example.com
points to wrong SSH server. You will need to clone using ssh://git.example.com:2222/user/repo.git
OR setup SSH Passthrough (SSH 容器直通) so that wrong SSH server directs git push
to Gitea’s SSH server. If helpful, English guide seems more updated (SSH Passthrough).
ssh://git.example.com:2222/user/repo.git
isn’t working.
Currently, only the following url is available
ssh://git@git.example.com:2222/user/repo.git
I will checkout the docs,Thanks a lot !