How to disable GIT_TRACE?

While trying to fetch from our git server, I unexpectedly started getting rejected permissions. According to this document , I used the GIT_TRACE_PACKET AND GIT_TRACE . We detected a problem and fixed it, but now every git command that I run is tracked. Can someone tell me how to disable this feature?

+6
source share
2 answers

As the comments say, these are not real teams. There is a ( export ) command, but it is a command shell ( bash in your case, although there are other shells), not a git command. It modifies the set of environment variables that the shell provides to other commands.

So, you just need to undo what you did in bash with another bash command.

You can use the SirBraneDamuj method :

 export GIT_TRACE_PACKET=0 GIT_TRACE=0 

This saves these variables in the environment, but changes their meaning. Or you can:

 unset GIT_TRACE_PACKET GIT_TRACE 

which completely removes these two names from the set of environment variables. The effect on git will be the same. (For some other commands and some other variables, sometimes there is a difference between "set to 0 or empty-string" vs "not set at all", so you should remember both methods.)

+9
source

When fixing the connection and permissions problem using Git, HTTPS, SSH and the corporate proxy, I got a ton of remaining debugging and detailed parameters and had no real clear reason why these parameters were saved.

If you find yourself in my position, you will want to completely clean the house:

  • GIT_TRACE , GIT_CURL_VERBOSE must be disabled or set to zero to disable logging from Git or Git using cURL

  • Custom ssh commands stored in GIT_SSH_COMMAND , GIT_SSH can hide -v or --verbose that need to be cleared

  • Set LogLevel to INFO in ~/.ssh/config and /etc/ssh/ssh_config for the domain (s) you are using against

  • Cancel or remove the detailed parameters from core.sshcommand in gitconfig , you can use git config --list --show-origin to view all your configurations and the files in which they live

  • While you look at gitconfig , make sure your aliases do not hide the detailed options

0
source

All Articles