9

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!

  • 1
    `man 5 netrc` makes no mention of any comment syntax. Beyond that, you would probably have to either (a) experiment, or (b) look at the source code of the application that uses it – alani Jul 09 '20 at 22:50
  • 2
    What happened when you tried it? – SiKing Jul 09 '20 at 22:51
  • 2
    What - by just trying every conceivable character sequence? – Dave Jul 24 '21 at 02:12

2 Answers2

1

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.

Jimmy
  • 11
  • 1
0

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

murison
  • 3,640
  • 2
  • 23
  • 36