I have a git repository on a server with IP address XXX.XX.XX.XX and my username is UUU
In my local laptop I am setting up as follows in my .git/config file:
[remote "origin"]
url = [email protected]:/home/UUU/repositories/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
receivepack = /usr/bin/git-receive-pack
uploadpack = /usr/bin/git-upload-pack
When I use git push or git pull on my laptop, I get the following error
bash: /usr/bin/git-upload-pack: No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What am I doing wrong?
Just remove everything you've added to the config file and instead:
As you can see, for user UUU you only need to specify the path within its home.
After this
.git/config
should have an entry like this: