我正在尝试构建一个Dockerfile,通过pip将需求安装到它构建的容器中.我认为可能无法在谷歌的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':
Run Code Online (Sandbox Code Playgroud)
该消息看起来像是试图将'credential-gcloud.sh'传递给git,而git正在响应它不知道它应该对它意味着什么.看起来谷歌设置用于身份验证的一些内部手段已经破裂.
我真的很想从私人回购中正确安装它.我不希望开发团队因为身份验证机制被破坏而不得不将其流程更改为更麻烦的东西.
...但它很棘手......因为pip在幕后做了一些事情来调用git,看起来谷歌正试图在幕后做一些事情来告诉git如何进行身份验证.
我创建了一个项目,试图在谷歌云源中的私人仓库中安装一个简单的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 …Run Code Online (Sandbox Code Playgroud) git pip docker google-cloud-platform google-cloud-source-repos