Skip to content
Go back

Git login with Netrc

Published:  at  08:52 PM

What is Netrc file ?

Netrc file contains user credentials and is used to auto-login. It is usually located in users home directory .netrc but location can be overridden with NETRC environment variable. Netrc also supports macros macdef to automate tasks. Netrc can be used with ftp, curl, git etc.

Netrc file:

Secure netrc file:

That’s it, next time when you use git for domain git.company.com, git should pick up the credentials on behalf of you ;)

Warning:

Use case:


Suggest Changes
Give Star

Previous Post
Netrc python client
Next Post
Custom git credential helper