user2052545
user2052545

Reputation: 121

Can I add comments to a .netrc file?

I'm using a .netrc file to steamline pushing and pulling code int a git repository. The problem is, I'm using multiple tenants on the same host, with different credentials. I was thinking about commenting out blocs in the .netrc file, depending on which tenant I'm connecting to.

Is this possible?

Thanks!

Upvotes: 12

Views: 4325

Answers (2)

murison
murison

Reputation: 3983

you could just add a on-purpose error in the host name, so that it doesnt match

Upvotes: 4

Jimmy
Jimmy

Reputation: 21

No, netrc files do not have comments as alani mentions. You could try to use several netrc files with just one host/tenant config and symlink the one you want to use to $HOME/.netrc.

Upvotes: 2

Related Questions