0

I have a script in which initially I do:

git clone --recursive https://$LoginRepo:$PassRep@git.example.com/my-repo.git

In next executions I always do git pull without password.

The problem is that the password is shown in errors. And I'm logging results so password is visible in clear text... So how to disable showing password in a message like this?

fatal: repository 'https://login:My-pass-123@git.example.com/my-repo.git/' not found

Is there some git option to stop this? Or maybe some better way to init (clone) repo in a script?

Nux
  • 9,276
  • 5
  • 59
  • 72
  • aren't you also providing your password as plain text in your initial script? As per [better options maybe you'll find them here](https://stackoverflow.com/a/10056098/2125110) – Daemon Painter Feb 03 '21 at 10:42
  • No need for an error. Anyone can see your password by doing ps at the right time. – stark Feb 03 '21 at 12:07
  • The variables are not set in the script. They are passed to it. So not in plain text. At least not directly. And normal users don't have access to that system. Just to logs. – Nux Feb 03 '21 at 14:41

0 Answers0