Note: This article was originally published in 2020. Some steps, commands, or software versions may have changed. Check the current Linux documentation for the latest information.

I was installing an open source project when I came into several issues. In order to install the dependencies I ran npm install on the shared library and came across the error message:

fatal: Unable to find remote helper for ‘git+http’

This of course complicated my entire existence. Tried to find a way to specify other protocol for git to get the source like https or plain old git but no luck. After hours and hours and considering the shared library is open source and I don’t control the code, I was looking for a way to git to smart its way around this… and thankfully I found it.

Solution:

This magic command made all my issues go away:

git config --global url."https://".insteadOf git+http://

Do note that the command is changing git+http:// to https://. Use it wisely. Also, looking online most users have an error with git+https:// (mine was plain http) (fatal: Unable to find remote helper for ‘git+https’) so in that case you need to run a slightly different command like this:

git config --global url."https://".insteadOf git+https://

Hope this helps!

Summary

This guide covered the common causes and solutions for this Linux issue. If the problem persists, check the official documentation or system logs for additional diagnostic information.