“Please generate new Identifier” error when pushing to cloud services using Android studio

后端 未结 6 1190
粉色の甜心
粉色の甜心 2021-02-06 05:40

I successfully import the project to google cloud. I am running android studio on a Mac. But, when i try to push the project to the cloud repository i get the error:

相关标签:
6条回答
  • 2021-02-06 05:49

    The first time you try to clone a repo if you put in the wrong credentials they will be cached and you will continue to get "Invalid authentication credentials" error until fixed. Git Credential Manager is used behind the scenes to cache credentials for sites but it is not obvious on how to edit those credentials. Here is how to fix the cached credentials on Windows:

    1. Follow the link to get you a password to authenticate with so you do not have to use your google account password.
    2. Navigate to Control Panel -> User Accounts -> Credential Manager

    3. Click on Windows Credentials and find an entry for git:https://source.developers.google.com

    4. Click on edit and use your google account email for user name and the git password you copied in step 1 for the password and save.

    You should now be able to clone your repository and git will use the stored credentials to authenticate.

    0 讨论(0)
  • 2021-02-06 05:52

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

    You have to have gone through this process first to ensure you have the Manual Credentials set up, but I'm sure you knew this already.

    0 讨论(0)
  • 2021-02-06 05:54
    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
    
    0 讨论(0)
  • 2021-02-06 05:55

    If you're using and/or creating a instance template, ensure you supply the correct permissions under Identity and API access.

    Under Access scopes: choose either "Set access for each API" or "Allow full access to all Cloud APIs", DON'T choose "Allow default access", which gives only Read

    0 讨论(0)
  • 2021-02-06 06:06

    As goodies4uall has said, it is an issue with cached credentials. On linux(Ubuntu), these details are cached at /home/<user>/.gitcookies You can edit this file and delete the lines having incorrect user details.

    0 讨论(0)
  • 2021-02-06 06:12

    Assuming you have previously set up your repository as described on this Cloud Source Repositories guide, you may want to try adding your repository as a remote. As described on 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 file may be enough to get you going as long you have the following text included in it: (more information can be found on your provided link)

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

    Lastly, make sure no source.developers.google.com cookies are included in your Git client by following the “Instructions for Removing Cookies” provided in your same link.

    0 讨论(0)
提交回复
热议问题