简体   繁体   English

是否可以公开访问私有GIT服务器?

[英]Is it possible to give public access to a private GIT server?

I have successfully setup a private GIT server using SSH keys and Gitolite, and i was able to clone, pull, push to that server with no issues, but now in order to give access to some repository on this server to any other computer, i need to add the public key of that computer to ssh authorized_keys of this server. 我已经成功地使用SSH密钥和Gitolite设置了私有GIT服务器,并且能够无问题地克隆,拉出和推送到该服务器,但是现在为了将对该服务器上的某些存储库的访问权限授予其他任何计算机,我需要将该计算机的公钥添加到该服务器的sshauthorized_keys中。 I want to know whether I can give public read and write access to this repository without actually adding the ssh public keys ? 我想知道是否可以在不实际添加ssh公钥的情况下授予对该存储库的公共读写访问权限吗?

I have tried to run git daemon, but i was not able to run it due to some port problems, but i want to know, if even with git daemon is it possible to give both read and write public access without adding ssh keys ? 我已经尝试运行git daemon,但是由于某些端口问题而无法运行它,但是我想知道,即使使用git daemon,也可以不添加ssh密钥就提供读写公共访问权限吗?

If you're not interested in allowing others to push to your repository, you can do this by just configuring HTTP transfers . 如果您不希望允许其他人推送到您的存储库,则可以通过配置HTTP transfers来实现 Those can be done over any port you want really, but ports 80 and 443 (the latter for HTTPS) are the ones that are most likely to be open. 这些可以在您真正想要的任何端口上完成,但是端口80和443(后者用于HTTPS)是最有可能打开的端口。

Failing that, your easiest approach is almost certainly to use a service elsewhere to host, with you regularly synchronising your local repository with that remote one. 如果不这样做,最简单的方法几乎肯定是在其他地方使用服务来托管,并定期将本地存储库与该远程存储库同步。 The details of what is best there will depend on all sorts of factors (eg, how public do you really want it to be?) 最好的细节将取决于各种因素(例如,您真的希望它公开吗?)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使一个人的私人git访问VPS public_html目录中的代码的最简单方法 - The simplest way to give one person private git access to a code at a VPS public_html dir 在私有 git 服务器上使用公共 git 存储库 - Using public git repositories on private git server 在私有git服务器上分支公共git存储库 - Branch a public git repository, on a private git server 是否可以在2台机器上使用相同的ssh私钥/公钥对来访问git存储库? - Is it possible to use the same ssh private/public key pair on 2 machines to access a git repository? 您如何通过Ansible为新配置的服务器授予对私有Git存储库的访问权限? - How do you give a Newly Provisioned Server access to a Private Git Repo with Ansible? git squash提交公共服务器,但保留私有服务器的详细提交 - git squash commits for public server, but keep detailed commits for private server 如何让 ECS 容器访问私有 git 存储库? - How do I give ECS containers access to a private git repo? 有没有办法访问公共但现在是私有的 git 存储库? - Is there a way to get access to a git repository which was public but now is private? 我自己的git服务器上的公共访问 - Public access on my own git server 在具有共享用户的公共服务器上使用git私钥的最佳实践 - Best practice for using git private key on a public server with a shared user
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM