4

I've been using GIT for Windows several months now with good success. Then suddenly when I try to open up Git Bash the way I usually do via explorer. I choose "Git Bash Here", bash shell opens up fore a split second only to display: "hostname: unknown option -- s Try 'hostname --help' for more information. /usr/bin/bash: can't find configuration file /usr/local/etc/profile.global; exiting."

I get this same error if I hop over to the Git directory and run git-bash.exe directly. However if I run the exe in administrator mode it opens fine. I changed the security permission to the executable so my username has full access but that didn't change anything.

Any ideas? Would love to get my "Git Bash here" capability back. Not sure why it stopped working? Thanks!

3
  • Its weird that changing the security permission didn't change anything, did you restart your pc? Once it happened to me too, I changed permission of the profile.global file then restarted and I was good to go Commented Nov 1, 2018 at 13:59
  • That path '/usr/local/*' didn't even exist but I created it and added an empty profile.global file. Now I still get the hostname error above and a prompt but it's not the nice msys term that I usually get. Commented Nov 1, 2018 at 14:59
  • Try reinstalling git bash, i assume you path or program files messed up....my windows updates without my knowledge and needs to reinstall stuff. Never had this kind of problem with git bash tho. Commented Nov 3, 2018 at 13:15

2 Answers 2

6

The solution at this link solved the issue in my case.

Just create an empty file at the path /usr/local/etc/profile.global

The usr folder is present in C:\ProgramFiles\Git

Sign up to request clarification or add additional context in comments.

Comments

0

This should be a bug of git, create an empty file named profile.global in C:\ProgramFiles\Git\usr\local\etc\ do works.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.