gitgoogle-cloud-platformgoogle-cloud-source-reposgoogle-source-repositories

Pushing code to google source repos error


I am getting the following error when pushing changes to my cloud source repo..

remote: INVALID_ARGUMENT: Request contains an invalid argument.
remote: [type.googleapis.com/google.rpc.LocalizedMessage]
remote: locale: "en-US"
remote: message: "Invalid authentication credentials. Please generate a new identifier: https://source.developers.google.com/new-password"      
remote:
remote: [type.googleapis.com/google.rpc.RequestInfo]
remote: request_id: "xxxxx"
fatal: unable to access 'https://source.developers.google.com/p/xxx/repository/': The requested URL returned error: 400

I then go ahead to generate new password and store in .gitcookies file but I still get the same error.


Solution

  • I solved this by generating a new .gitcookies identifier using the Generate new identifier link and executing the command (sample is below) given after authentication with my account with the command line.

    git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
    powershell -noprofile -nologo -command Write-Output ...
    

    Initially because I saw powershell and all I used powershell and even git bash but they all did not work.

    I found that for windows users, just copy the command for the windows users section and paste in windows command line and not powershell or git bash.