Gcloud init fails for invalid username / password

I'm trying to access the built-in git repository for an existing Google Developers Console (GDC) project. GDC shows the git repository under -SOURCE CODE-Releases. I followed the official gcloud installation instructions:

gcloud auth login /* pulls up browser and does authentication just fine */
gcloud config set project <project>
gcloud init <project>

      

The latter always leads to the following (replacing the actual project name with "fishbone"):

$gcloud init fishbone
Initialized gcloud directory in [/Users/dummy/Workspace/fishbone/.gcloud].
Cloning [https://source.developers.google.com/p/fishbone/r/default] into [default].
Initialized empty Git repository in /Users/dummy/Workspace/fishbone/default/.git/
fatal: remote error: Invalid username/password.
You may need to use your OAuth token password; Note that generated google.com passwords are not compatible with private repositories
ERROR: Unable to initialize project [fishbone], cleaning up [/Users/dummy/Workspace/fishbone].
ERROR: (gcloud.init) Could not fetch repository.

      

Only when installing the SDK for the first time (try again now) I remember that gcloud init asks for a username. Never again after that. Mac OS X 10.9.3 and:

$git --version
$git version 1.8.5.2 (Apple Git-48)

      

I know this related gcloud init issue , but it is not. Help with gratitude.

+3


source to share


3 answers


Go to https://console.developers.google.com/project/your-project-id > Source Code> Browse> Find this line: "Alternatively, instead of using the Google Cloud SDK to manage your authentications, you can manually generate your credentials Git by following this link. " > Click on this link and you can see your Git password. As you can see in your error, google password is incompatible with private repos. Now you can:



  • Use your gmail and Git password above to clone the reposite.
  • Or create a .netrc file in your home folder and add: "machine source.developers.google.com login your-email@gmail.com password 1 / abxxxxxxxxxxxxxxxxxxxxxxx" to this file. It will not ask you for your password again.
+1


source


Just go to your google developer console and click / find content as shown below

"Alternatively, instead of using the Google Cloud SDK to manage your authentication, you can manually generate your Git credentials by following this link."



and click on this link, then follow the instructions on this page.

That's all.

0


source


They migrated the settings for manually created Git credentials. The options are now under GCP -> (tools) Development -> Source Code and when configured when cloning new or existing repositories, they give you the option to use gcloud or create your own credentials.

also below in screenshots Get Starter

Google Cloud SDK (recommended)

Manually create, follow the dropdown

0


source







All Articles