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?
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).
The . netrc file is typically stored in a user's home directory. (On Windows, curl will look for it with the name _netrc ).
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 .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With