英文:
Golang dependency manage in private/enterprise git server
问题
我在一家公司工作,公司不允许员工访问GitHub或任何下载/上传文件的网站。现在我正在研究使用Golang实现,但问题是由于上述政策,我无法从GitHub获取库。
我可以请求特殊情况下使用GitHub的权限,但是如果申请所有员工的权限,就不行了。
我们有一个私有的GitLab服务器。所以有没有办法将GitHub仓库自动克隆到我们的Git服务器私有/企业网络中呢?
谢谢。
英文:
I'm working in a company not allow employee visit github or any down/upload file site. Now I'm investigate implement with golang but problem is because of policy above , I cannot get library from github.
I can request permission to use github for some special case, but when apply for all employee, it cannot.
We have a private gitlab server
So Is there anyway to auto clone github repo to our git server private/enterprise network
thank you
答案1
得分: 1
根据政策的具体原因,可能可以使用基于代理的解决方案。在以前的雇主那里,我们使用Athens设置了一个解决方案,通过代理访问外部托管的Go模块,以便任何内部构建都可以访问。
还可以进行权限控制,因为可以配置Athens通过webhook调用来获取特定模块的“是/否”答复。
这两种方法都可以消除直接访问GitHub或类似平台的需求,同时仍然允许(比如)强制执行许可要求。
英文:
Depending on the exact reasoning for the policy, it MAY be possible to use a proxy-based solution. At a previous employer, we set up a solution using Athens, where any internal build could access externally-hosted Go modules through the proxy.
It is also possible to do permissioning, as Athens can be configured to call out with a webhook to get a "yes/no" for any specific module.
Both of these would eliminate the need to directly accessing GitHub or similar, while still allowing space to (say) enforce license requirements.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论