Question

When I launch an EC-2 instance and type git init, gitbash says "-bash: git: command not found" why? how can I fix this?

Posted March 24, 2020 620 views
Git

“-bash: git: command not found” using gitbash

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @towanimaria,

It seems git is not installed and as such you’ll need to install it.

If you are on a CentOS OS, you can use

yum install git

If it’s Ubuntu, use

apt install git

That’s it, you should be good to go.

Regards,
KDSys

Submit an Answer