Cloud push-to-deploy via git with a password

1,610 views
Skip to first unread message

Liam Clancy

unread,
Mar 27, 2014, 9:32:53 AM3/27/14
to google-c...@googlegroups.com
Initially projects setup in the Cloud Developer console had an option to generate a Git password to access the repository used for push-to-deploy. This was needed for IDE/GUI's and other git tools that did not understand oauth2.

It was previously found under Cloud Deployment > Releases > Configuration > Generate Git Password

There is a screenshot included in the docs to illustrate this: https://developers.google.com/appengine/docs/push-to-deploy#selecting_a_release_type

The UI seems to have changed since and there is no longer this option, however clients setup with a password still continue to work, even after an error regarding the lack of gcloud oauth2 integration:

 "git: 'credential-gcloud.sh' is not a git command. See 'git --help'."

Git on the command line works fine after running and storing the oauth2 tokens via 'gcloud auth login'.

I am using:
 * Google Cloud SDK 0.9.20
 * Mac OS X 10.9.2
 * git version 1.9.0
 * Git Tower as an example non oauth2 aware app.

Qu: is this option intentionally removed and/or will not be supported in future?
Qu: is there a way to integrate the credential-gcloud.sh with Git using IDE/GUIs


Liam

John Asmuth

unread,
Mar 27, 2014, 9:42:24 AM3/27/14
to Liam Clancy, google-c...@googlegroups.com
google-cloud-sdk/bin needs to be in the PATH seen by your IDE - in there is a script 'git-credential-gcloud.sh' (which is what git really means when it talks about 'credential-gcloud.sh', and when we set 'gcloud.sh' as the credential helper, go figure) that must be available to your IDE. Also, the gcloud binary must be available.

So here's the tricky part - setting the PATH for a mac UI program is actually *really* tricky. Certainly the contents of your .bashrc have no effect on it.

I recommend you put symlinks to gcloud and git-credential-gcloud.sh in /usr/local/bin

$ sudo ln -s /wherever/you/put/google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud
$ sudo ln -s /wherever/you/put/google-cloud-sdk/bin/git-credential-gcloud.sh /usr/local/bin/git-credential-gcloud.sh

In the future, our installers will do this for you - the current mechanism with setting PATH is just something that works until we get a nice native installation experience for each platform.

John Asmuth

unread,
Mar 27, 2014, 9:43:27 AM3/27/14
to Liam Clancy, google-c...@googlegroups.com
I wasn't completely clear in my last email - creating those symlinks can be done *instead* of the stuff for PATH. If you make a symlink in /usr/local/bin for every binary in google-cloud-sdk/bin, then all of this PATH nonsense can be skipped entirely.

Jeremiah van Oosten

unread,
May 21, 2014, 7:44:45 AM5/21/14
to google-c...@googlegroups.com, Liam Clancy
John,

I am experiencing a similar issue on Windows 7 64-bit. TortoiseGit is using the gcloud.cmd credential helper but if I try to run a pull or push command using TortoiseGit, a command window appears and hangs indefinitely. Running the command 'gcloud auth it-helper "get"' on the command line also hangs indefinitely.

Running "git push origin mater" and "git pull origin master" on the CLI works fine but using TortoiseGit to perform the same thing does not work.

The path the google-cloud-sdk/bin folder is in my user PATH variable.

Any ideas?

Regards,

Jeremiah van Oosten

John Asmuth

unread,
May 21, 2014, 11:02:24 AM5/21/14
to Jeremiah van Oosten, google-c...@googlegroups.com, Liam Clancy
Hi Jeremhiah,

'$ gcloud auth git-helper get' will indeed hang - it's waiting for input like
protocol=https
host=source.developers.google.com
If you can verify that typing that into the git helper works, then the problem is with how tortoise-git is accessing things, and we can go from there. 
Message has been deleted

Jake Vosloo

unread,
Sep 7, 2014, 1:17:34 AM9/7/14
to google-c...@googlegroups.com, oost...@ade-nhtv.nl, metaf...@google.com
I'm having the same problem with gcloud auth git-helper get on Windows 8 x64 with TortoiseGit as Jeremiah. 
I typed the following into the console window but it had no effect:
protocol=https

This is raised as an issue on Google Code.
Any further ideas?

Jeffrey Vaughan

unread,
Sep 8, 2014, 5:00:08 PM9/8/14
to google-c...@googlegroups.com, oost...@ade-nhtv.nl, metaf...@google.com
Hi Jake,

Are there leading spaces in front of "protocol" and "host"?  This can cause `gcloud auth git-helper git` to fail.  (It's a bug an we're now tracking it internally.)  If you're still having trouble try creating a file, say test.txt, containing 
protocol=https
and running 
  type test.txt | gcloud auth git-helper get 

Cheers,
Jeff
Reply all
Reply to author
Forward
0 new messages