When pushing code to Google Cloud remote repo git manually requires password -


context : try push code google remote repo

from git bash , in project folder : ran below cmd :

git push --all google 

and got :

fatal: remote error: invalid username/password. may need use oauth token password; note generated google.com passwords not compatible private repositories 

investigation

i have tried possible solution there link

as explained, tried command unset manager settings , got:

$ git config --system --unset credential.helper error: not lock config file c:\program files\git\mingw64/etc/gitconfig: permission denied 

to bypass permission denied, ran git bash in admin mode, worked !! :smiley:

then retried push code gcloud :

git push --all google  username 'https://source.developers.google.com': "username input " `*( put gmail adress not sure if it's right thing)*` 

then after validating username got openssh pop asking me password.... tried 1 gmail adress...and failure

username 'https://source.developers.google.com': myadress@gmail.com fatal: authentication failed 'https://source.developers.google.com/p/udacity-142622/r/udacity/' 

could please ?? :frowning:

assuming added google cloud git remote repository as

git remote add google https://source.developers.google.com/p/project 

you have had do

git config credential.helper gcloud.cmd 

then

git pull google 

and hence

git push --all google 

should work. assuming

  1. you not have system credential helper set

    git config --system --unset credential.helper 
  2. gcloud on path, is

    where gcloud 

    shows like

    ...\google\cloud sdk\google-cloud-sdk\bin\gcloud.cmd 
  3. you have account set using gcloud, is

    gcloud config list --format="value(core.account)" 

    shows username@domain.com.

  4. you able access project using above account, example can list repos in project using alpha command

    gcloud alpha source repos list 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -