[英]Gitlab: Accessing a fork of a private repository
We're attempting to use a private deployment of Gitlab for a university module.我们正在尝试将 Gitlab 的私有部署用于大学模块。 Here's what we are trying to do:这是我们正在尝试做的事情:
All is well, except that we won't have access to the private repositories that the student forks .. We had a great idea to make each student add a public SSH key to their profile, but Alas!一切都很好,除了我们无法访问学生分叉的私有存储库..我们有一个好主意让每个学生在他们的个人资料中添加一个公共 SSH 密钥,但是唉! It is not possible since SSH keys have to be unique to each user .. are there any workarounds to this?这是不可能的,因为 SSH 密钥必须对每个用户都是唯一的……有什么解决方法吗?
Gitlab does have a feature called "Deploy Keys", which grant read-only access to a project, Students would need to manually add the public key to their project, but it would then provide you with access to their work. Gitlab 确实有一个名为“部署密钥”的功能,它授予对项目的只读访问权限,学生需要手动将公钥添加到他们的项目中,但它会为您提供对他们工作的访问权限。
I don't believe it would have the same restrictions as the standard user keys.我不相信它会有与标准用户密钥相同的限制。
To quote their documentation "Deploy keys allow read-only access to multiple projects with a single SSH key."引用他们的文档“部署密钥允许使用单个 SSH 密钥对多个项目进行只读访问。”
Further details ( https://docs.gitlab.com/ce/ssh/README.html#deploy-keys )更多细节( https://docs.gitlab.com/ce/ssh/README.html#deploy-keys )
For those of you seeing this now, we managed to get this done using a mix of deploy keys and groups as suggested by @jdow .. However, this solution is a bit of a hack and has some disadvantages including:对于那些现在看到这一点的人,我们设法按照@jdow 的建议使用部署密钥和组的组合来完成此操作。但是,此解决方案有点麻烦,并且有一些缺点,包括:
Therefore, I proposed a new feature called "gitlab classrooms" which I have detailed here因此,我提出了一个名为“gitlab 教室”的新功能,我在此处详细介绍了该功能
We're attempting to use a private deployment of Gitlab for a university module.我们正在尝试将Gitlab的私有部署用于大学模块。 Here's what we are trying to do:这是我们正在尝试做的事情:
All is well, except that we won't have access to the private repositories that the student forks .. We had a great idea to make each student add a public SSH key to their profile, but Alas!一切都很好,除了我们无法访问该学生创建的私有存储库外。.我们有一个很好的主意,使每个学生都可以在其个人资料中添加一个公共SSH密钥,但是可惜! It is not possible since SSH keys have to be unique to each user .. are there any workarounds to this?由于SSH密钥对于每个用户而言都是唯一的,因此这是不可能的。对此是否有任何解决方法?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.