Fix #7533: Expand user home folder for the key_file path of the git module
Remove trailing whitespaces of the git module