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
you not have system credential helper set
git config --system --unset credential.helper
gcloud
on path, iswhere gcloud
shows like
...\google\cloud sdk\google-cloud-sdk\bin\gcloud.cmd
you have account set using
gcloud
, isgcloud config list --format="value(core.account)"
shows username@domain.com.
you able access project using above account, example can list repos in project using alpha command
gcloud alpha source repos list
Comments
Post a Comment