Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automate username/password entry when git pushing over http from windows machine

Tags:

git

windows

I am pushing from my windows box to a repository cloned from an http (not ssh) address. Each push, I have to enter my u/p. I want to automate this process. I have tried the following:

$ git config credential.helper cache
$ git config credential.helper 'cache timeout=360000'

But those settings had no effect and I still have to enter the u/p each time. Is there any way to automate it?

like image 578
Jonah Avatar asked Oct 12 '25 13:10

Jonah


2 Answers

Use _netrc file to store your username/password for remote machine, described here

like image 93
tomgi Avatar answered Oct 14 '25 01:10

tomgi


Newer versions of Git support a more streamlined credentials API. Depending on implementation of the credentials helper, this is typically more convenient and secure than using .netrc.

A popular windows credentials helper is git-credential-winstore.exe. Simply download to the git/bin path and execute. Github supplies a similar helper.

Additional detail here (but not specific to Windows):

  • Is there a way to skip password typing when using https:// on GitHub?
like image 22
kaliatech Avatar answered Oct 14 '25 02:10

kaliatech



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!