Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of the '.netrc' file

Tags:

git

.netrc

When I try to use Google Cloud's Push-to-Deploy feature, they asked me to add some credential in the .netrc file. What is the .netrc file? What is the purpose?

like image 318
Fizer Khan Avatar asked Feb 17 '14 11:02

Fizer Khan


People also ask

What is Netrc file Linux?

The . netrc file contains data for logging in to a remote host over the network for file transfers by ftp(1). This file resides in the user's home directory on the machine initiating the file transfer. Its permissions should be set to disallow read access by group and others. See chmod(1).

Where do I put Netrc files?

The . netrc file is typically stored in a user's home directory. (On Windows, curl will look for it with the name _netrc ).

What is Linux Netrc command?

The . netrc file contains login and initialization information used by the auto-login process. It generally resides in the user's home directory, but a location outside of the home directory can be set using the environment variable NETRC . Both locations are overridden by the command line option -N .


1 Answers

This is a file that is often used by Unix programs to hold access details for remote sites. It was originally created for use with FTP.

See the man page and this answer for its use with Git on Windows specifically.

like image 155
patthoyts Avatar answered Nov 22 '22 11:11

patthoyts