"Please generate a new identifier" when you click on cloud services using Android studio

I successfully import the project into the Google Cloud. I am running android studio on Mac. But, when I try to push the project to the cloud repository, I get the error:

fatal: remote error: invalid credentials. please generate a new identifier:
https://source.developers.google.com/auth/start?scopes=https://www.googleapis.com/auth/cloud-platform

I got lost here, Android-studio, git and the Google Cloud are new to me.

The help link provided on error does not mention where I should get the new credentials. Running the machine command, I get an error message:

machine: no arguments accepted

+6
source share
6 answers

The first time you try to clone a repo, if you enter the wrong credentials, they will be cached and you will still receive the "Invalid authentication credentials" error until it is fixed. Git Credential Manager is used to hide the credentials for sites, but it is not clear how to edit these credentials. Here's how to fix cached credentials on Windows:

Now you can clone your repository, and git will use the stored credentials for authentication.

+14
source
I have faced same problem but finally solved the issue after executing following commands. Such type of issue can arise when you by mistakenly enter invalid credential at first time. so it caches the credential entered at first time. git config --global --unset credential.helper git config --system --unset credential.helper git config --global credential.helper manager 
+6
source

Assuming you have previously set up your repository as described in this Cloud Source Repositories, you can try adding your repository as a remote control. As described in this second part of the guide , running the credential helper script may solve your remote error:

  • git config credential.helper gcloud.sh

Alternatively, adding a .netrc may be enough for you to log in for so long that you have the following text included in it: (additional information can be found on your provided link )

  • machine source.developers.google.com login [your email address] password [Git password]

Lastly, make sure that the cookies source.developers.google.com not included in your Git client by following the "Cookie source.developers.google.com Instructions" source.developers.google.com in your own link.

+1
source

For osx on Mac ... this led me to bananas! I went to Keychain> All Items> deleted the entry under "GitHub - source.developers.google.com/[your repo address]" and then tried again.

You must go through this process first to make sure you have the credentials set manually, but I'm sure you already knew that.

+1
source

If you use and / or create an instance template, make sure that you provide the correct permissions in the Authentication and API access .

In the access area: select either "Set access for each API" or "Allow full access to all cloud APIs", DO NOT select "Allow default access", which gives only Read

0
source

As goodies4uall said, this is a problem with cached credentials. On Linux (Ubuntu), this data is cached in /home/<user>/.gitcookies You can edit this file and delete lines with invalid user data.

0
source

Source: https://habr.com/ru/post/1262340/


All Articles