Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker镜像下支持使用物理机其他端口的问题 #74

Open
skyatgit opened this issue Mar 25, 2022 · 8 comments
Open

docker镜像下支持使用物理机其他端口的问题 #74

skyatgit opened this issue Mar 25, 2022 · 8 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@skyatgit
Copy link

在docker下搭建的时候能否使用物理机的其他端口来映射镜像的22端口
然后在系统的管理员的设置界面支持修改ssh的端口
同时需要更新克隆代码时ssh的链接从[email protected]:testaaa/testproject.git 改为ssh://[email protected]:9022/testaaa/testproject.git

@Rabbit0w0
Copy link

改容器配置即可

@skyatgit
Copy link
Author

可以详细说一下吗,我只可以让镜像使用物理机的其他端口,但是没有办法让这套系统知道端口变了而改变每个项目克隆时的链接

@skyatgit
Copy link
Author

而且即便是配置好了公钥拉代码的时候也总是验证不过去

@cubicwork
Copy link
Contributor

@skyatgit 我大概明白你的意思了,你是希望 点击 clone 按钮以后,复制的地址带上端口号么?

  1. 你按照此文档的描述去修改主机 URL 即可。 doc/zh-cn/admin/settings.md
  2. 公钥是如果每次验证不能通过,请在第一次使用 ssh 链接的时候选择保存 pubkey,当 保存 pubkey 以后再更改端口时,需要去你的电脑上修改 ~/.ssh/known_hosts 文件删除之前保存的 pubkey

如果问题没有解决请继续回复此 issue, 如果解决请自行关闭此 issue

@cubicwork cubicwork added the question Further information is requested label Mar 28, 2022
@skyatgit
Copy link
Author

按照上述方法只能设置主机的URL,这个设置影响的是以HTTP方式拉取代码的URL
比如我容器设置的端口映射方式为 8080:80 8022:22,用户在浏览器登录需要输入http://192.168.2.25:8080
在后台设置主机URL的时候设置为http://192.168.2.25:8080的话
HTTP方式克隆代码的链接为http://192.168.2.25:8080/root1111/111112231.git
SSH方式克隆代码的链接为[email protected]:8080:root1111/111112231.git
显然SSH方式给出的链接是错误的,目前在系统上没有找到可以设置SSH链接端口的方式
而且即便SSH方式克隆代码的链接为[email protected]:8022:root1111/111112231.git
这个链接的格式也是不对的

@cubicwork
Copy link
Contributor

@skyatgit 好的 我明白你的意思了,我们会在管理员设置里面新增 ssh 链接设置的功能。

@cubicwork cubicwork added the enhancement New feature or request label Mar 28, 2022
@skyatgit
Copy link
Author

好的非常感谢

@cubicwork
Copy link
Contributor

@skyatgit 我们会在此 issue 中更新你要求的特性的更新情况,当特性被更新后,我们会关闭此 issue

@cubicwork cubicwork reopened this Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants