How can we connect to a git account from Google cloud shell which already has git installed?


I am able to see git already installed in cloud shell. Also, when i fire
‘git config –list’ command i get below output.


Which credentials are these? And how can I connect to my github account?

Thanks in advance.


Thank you everyone for your answers. I’ll mention what worked for me.

I set up git configuration using

git config --global "[email protected]"
git config --global "Your Name"

when I cloned my private repo using,

git clone https://[your-git-repo].git

I had to enter my GitHub password. Then I performed whatever changes I had to make and after commiting did

git push

Again I had to provide my github password and the changes were pushed to my private repo.
Please let me know if there is any better/ideal way to achieve the same.

Password Authentication has been removed from Aug2021 onwards. So now, this solution won’t work.
One of the alternatives to authenticate to GIT account is by generating Personal Access Token. Details can be found here

Once token is generated, save the token and it can be used instead of password to authenticate to Github.

Answered By – bilalgazge

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published