May 31, 2022

Git asks for password each time I git push”. Solution: caching credentials with git

If you cloned a repository using HTTPS, git will ask for credentials each time you git push”.

You can cache credentials so that you don’t have to enter credentials each time you git push”.

To cache your credentials:

$ git config credential.helper store
$ git push <HTTPS URL of repository>

Git should ask for your username and password:

Username: <USERNAME>
Password: <PASSWORD>

Next time you run git push”, git should not ask for credentials.

By the way, if you are not sure whether you added the remote as HTTPS or SSH, you can check by running:

$ git remote -v

remote” shows you which remote servers you have configured; -v” shows you the URLs that Git has stored.

Please note that your credentials are stored in plain text locally.

✍✍✍✍✍✍✍✍✍✍✍✍✍✍

I do self-funded research and I'm writing a book.

> What's the book about?

About technologies and agency.

Meaning, technologies can foster agency. No doubt. But I am also asking:

Can usage of technologies give us a sense of empowerment while in fact undermining our abilities?

I posted a summary of the prologue on the homepage: https://yctct.com/

✍✍✍✍✍✍✍✍✍✍✍✍✍✍


git command-line interface (cli) personal computing gnu linux

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2024 by yctct.com is licensed under CC BY-ND 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88