Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-upload-pack not found when deploying [duplicate]

When I'm trying to deploy my react app to github pages, I ran npm run deploy. It managed to build but has the following errors when deploying:

git-upload-pack '.': git-upload-pack: command not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

My git remote -v returns:

origin  https://github.com/helplah/shopping-cart.git (fetch)
origin  https://github.com/helplah/shopping-cart.git (push)
like image 335
jenlky Avatar asked Aug 08 '18 14:08

jenlky


1 Answers

I managed to solve it by looking at other answers here. First, you type which git-upload-pack to find out if git has access to it.

If it does not, on Windows 7 you have to go control panel -> System -> Advanced system settings -> Environment variables -> edit path. Over there add the path of git-upload-pack.

git-upload-pack is usually in C:\Program Files\Git\mingw64\bin or C:\Program Files\Git\mingw64\libexec\git-core. You can find it in \Git\mingw64.

I added both paths and after restarting my computer it worked for me.

like image 152
jenlky Avatar answered Nov 14 '22 00:11

jenlky