I have been losing my mind due to IntelliJ not wanting to commit my code. I had put export GPG_TTY=$(tty)
into my .bash_profile
instead of my .bashrc
; echoing $GPG_TTY
responded with the proper path, but I still kept getting the gpg: failed to sign the data
error.
From what I gather, .bash_profile
is read and executed when Bash is invoked as an interactive login shell, while .bashrc
is executed for an interactive non-login shell; $PATH
variables should thus go into the .bash_profile
...? Or, at least, so I thought. I'd like to know what the functional difference is between the two: why didn't it work from my profile but it does from the rc?
.bash_profile
if you run a desktop system which has a GUI, and instead just dump things into the.bashrc
.