npm - .npmrc file permission are not stored by git -


in project want use .npmrc file point private repository. documentation npmrc read:

note: because local (per-project or per-user) .npmrc files can contain sensitive credentials, must readable , writable user account (i.e. must have mode of 0600), otherwise ignored npm!

unfortunately git not honouring file permission 0600.

so: how store .npmrc file in git?

as found out right.

git doesn't care file permissions.

git stores 2 permissions (755 & 644), need of 600 not "recognized" git.

to override im using manual script this site or this


umask

umask process attribute containing permission bits removed newly created files.

git creates directories , executable files mode 777, , non-executable files 666, , umask turns off of bits.

if want default permissions 644 , 755, set umask 022:

umask 022 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -