I would like to set the value of github.token in my ~/.gitconfig to be the result of a shell command. I currently have the following:
[github]
user = zmanji
token = !echo ~/.githubtoken 2> /dev/null
However git config github.token does not return the contents of the ~/.githubtoken file but the command itself. How can I get this to work as desired?
Edit: Just to be clear, I am trying to achieve what is implied here:
You can also define github.token to be a command which returns the actual token on stdout by setting the variable to a command string prefixed with
!
.