# Linux `true` `false`

Today when I was answering a question (opens new window) on StackOverflow about how to force Git to fail when it prompts for a password (for example, for HTTP Authentication), I saw that git had a GITASKPASS environment variable (opens new window). It lets you specify the program git needs to call to ask you for a password.

I suspected that there must be some built-in "blank" script in Linux that just does nothing and exists, but couldn't find one. So I suggested creating setting GITASKPASS to an empty script. After I posted my answer, gspr (opens new window) suggested using either the true or false command.

true does "nothing" and then returns a zero/success exit code. false also does nothing, but returns a non-zero/fail exit code.

true ended up being perfect for the purposes of GITASKPASS.

Thank you for reading my blog! If you enjoyed this post, you're welcome to subscribe via RSS here (opens new window).

Last Updated: 4/14/2021, 10:41:39 AM