如何在谷歌云端运行从私人回购安装点要求?

我正在尝试构build一个Dockerfile,通过pip将需求安装到它构build的容器中。 我认为在google的SDK /云端控制台中可能没有设置正确的东西。 我得到这个错误:

me@cloud-q2smart:~/github/jokepkg/test$ sudo pip install -r test-ggl-install/requirements.txt Obtaining funniest from git+https://source.developers.google.com/p/cloud-q2smart/r/jokepkg#egg=funniest-0.1 (from -r test-ggl-install/requirements.txt (line 1)) Updating ./src/funniest clone git: 'credential-gcloud.sh' is not a git command. See 'git --help'. Username for 'https://source.developers.google.com': 

该消息看起来像是什么东西试图通过“credential-gcloud.sh”git,和git是响应,它不知道这是什么意思。 它看起来像谷歌已经build立了authentication的一些内部手段被打破。

我真的想要从私人回购正确安装。 我不希望开发团队只是因为authentication机制被破坏而不得不改变他们的stream程到更麻烦的地步。

…但这很棘手…因为pip在幕后调用git,而且看起来谷歌正在试图在幕后做一些事情来告诉git如何进行身份validation。

我创build了一个项目,试图在谷歌云源中的私人回购安装一个简单的Python包。 运行它的说明如下:

 ( Start up google cloud shell ) $ git clone https://github.com/jnorment-q2/jokepkg.git # pull down my sample package $ cd jokepkg # ( create repo in cloud ) $ git remote add google https://source.developers.google.com/p/cloud-q2smart/r/jokepkg $ git push google master # Change to test directory and attempt to build Dockerfile $ cd test $ docker build -t test --no-cache . 

这应该试图在我的Jenkins CI创build用作临时构build环境的完全相同types的容器中构build基于需求的依赖项。 第一个是成功的,因为这是公共回购,没有什么可以configuration安全的。 它到达谷歌版本时将会失败。 我不知道如何从Dockerfile解决这个问题。

如果有人能把我引向正确的方向,我会很感激。

我很好,把一个证书文件推入到构build环境/构build奴隶,但无论是在做什么谷歌似乎优先于我为git设置的信誉:

 git config --local credential.username google-svc-account git config --local credential.helper store --file=/tmp/creds 

…我宁愿不要将requirements.txt文件绑定到特定的用户ID。