If you’d like to use a GUI client, like GitHub Desktop, you have to do a little more work to get manually-generated credentials and then to use them with your GUI of choice. To get manually-generated credentials, do the following:
1. Go to the "Development" section in the Cloud Console.
2. Open the repository dropdown and select "Clone Repository":
3. Change the authentication mode to "Manually generated credentials":
4. Click "Generate and store your credentials":
The trick here is to actually click on the “Generate and store your Git credentials”, since that’s the magic where you get your credentials for use in your local GUI clients. If you press OK, then the dialog goes away and you have to start over again.
5. Gather the Git password (which goes along with the email you used to authenticate) presented when you click the link. You don’t need to populate the .netrc file when using GUI clients, since they’ll ask you for your username/password pair directly (as you’ll soon see).
Now you have your git username and password. With that, you have the credentials you need to use the repo from GitHub Desktop, but you still need to use some tricks to get GitHub Desktop to use your repo, since it isn’t hosted on GitHub:
1. At the command line, use “gcloud init” to set up the GCS credentials locally on your machine and “gcloud source repos clone <repo-name>” to bring the <repo-name> repo down as described here.
2. Start GitHub Desktop, press the + button in the upper left and choose to add the repo from your local disk:
3. When you have a local commit to this repo that you’d like to push, GitHub Desktop will know that it’s going to Cloud Source Repositories, but it’s not going to know the credentials, so this is when you use the git credentials you manually generated earlier:
The user name is the email address you used to generate the Git password from step #5 above.
With your manually-generated Git credentials, you’ve got the username/password pair that your GUI clients can use to connect to Cloud Source Repositories. The above shows how to do this for GitHub Desktop, but the same trick should work from popular IDEs like Eclipse, Visual Studio, etc.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-dev/cWUjNAUIiJ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-dev/921c492a-2aaf-439f-8f38-f96247574333%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Glad to hear it. Keep those cards and letters coming.