Getting Development Repository OAuth key

38 views
Skip to first unread message

Jason Haury

unread,
Jun 17, 2016, 1:01:28 PM6/17/16
to Google App Engine
I'm using the Development Repository within Google Cloud Platform.  In many ways, it acts like a normal git repository, but I can't figure out how to get an OAuth token to allow another app to use the repository.  The other app needs an OAuth token just like how github provides.  

From what I can see, all OAuth token available by Google are for specific APIs shown in the cloud console API Manager, and none of those APIs are for Development Repository (perhaps the Cloud Storage API is a hook in?).   

How can I get an OAuth token to allow github.com-like access to my Google Development Repo?

Nick (Cloud Platform Support)

unread,
Jun 20, 2016, 5:02:08 PM6/20/16
to Google App Engine
Hey Jason,

You can use gcloud auth activate-service-account --key-file KEY_FILE on systems outside Compute Engine (GCE), and the usual gcloud source repos branch of the command for GCE machines, as described in this Stack Overflow answer. This is the recommended way, although if you wanted to inspect your local system to find the token after gcloud auth and attempt to formulate raw HTTP requests, you could, just be aware that oauth2 bearer tokens are secrets and should be secured well in transit.

Sincerely,

Nick
Cloud Platform Community Support
Reply all
Reply to author
Forward
0 new messages