满足,Bitbucket和SSH [英] Satis, Bitbucket and SSH

查看:200
本文介绍了满足,Bitbucket和SSH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我们的一台远程服务器上设置了一个Satis存储库,以允许访问托管在Bitbucket上的私有软件包.我已经在该服务器上创建了SSH密钥对,并将公共密钥添加到了我们的Bitbucket用户.这样构建Satis可以很好地工作.

I've setup a Satis repository on one of our remote servers allowing access to our private packages hosted on Bitbucket. I've created an SSH key pair on that server and added the public key to our Bitbucket user. Building Satis works just fine this way.

现在,当我想在托管应用程序的任何远程服务器上执行composer install时,除非我在该服务器上创建密钥对并将其公共密钥添加到Bitbucket,否则我没有正确的权限.我不想对每个项目(在环境中为3倍)最终在我们的Bitbucket帐户中使用近100个公钥进行此操作.

Now, when I want to do a composer install on any remote server hosting an app, I don't have the right permissions unless I create a key pair on that server and also add its public key to Bitbucket. I don't want to do this for every project (times 3 for environments) ending up with almost 100 public keys in our Bitbucket account.

如何避免这种情况? 有没有一种方法可以将所有软件包都镜像到Satis存储库上,因此在composer install打包时可以直接从Satis存储库中获取这些软件包而无需使用公共密钥吗?

How can this be avoided? Is there a way to have all packages mirrored on the Satis repository, so when composer installing the packages can just be fetched from the Satis repo without the need of having to use the public keys?

推荐答案

是的,您必须在Satis服务器上创建档案.如果启用,Satis将为找到的每个标签创建一个ZIP文件并将其放入您配置的目录中.

Yes, you have to create archives on the Satis server. If enabled, for every tag found Satis will create a ZIP file and put it into the directory you configure.

这还将加快安装速度,因为该ZIP文件一旦下载,将存储在本地.请注意,仅当未在供应商文件夹中安装软件包时才使用ZIP.目前,我假设您已经用Git克隆了所有软件包,并且Composer不会更改此设置-获取更新然后签出标签比删除仓库和下载ZIP更快.而且,如果您仍在使用Git,则必须具有密钥.

This will also speed up installation because that ZIP, once downloaded, will be stored locally. Note that ZIPs will only be used if the package has not been installed in the vendor folder. Currently I assume you are having all packages cloned with Git, and Composer will not change this - fetching updates and then checking out a tag is faster than deleting the repo and downloading the ZIP. And if you are still using Git, you have to have keys.

更改Satis配置后,删除供应商文件夹并在此之后更新应下载ZIP.

Deleting the vendor folder and updating after that should download ZIPs once you changed the Satis configuration.

这篇关于满足,Bitbucket和SSH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆