I tried links in this article, seem doesn't work for me: https://stackoverflow.com/questions/31801271/what-are-the-supported-git-url-formats
Problem that I have setup a local git server at /srv/repo/
for example, and when I create a repo under it name test.git
with --bare
under username testuser
, I'd like to add this test.git
as remote from other local machine in the same network.
For example, local git server has ip address at 192.168.1.10, and I need to add its repo on machine that has ip address of 192.168.1.100 for example.
If I use this URL and change user owner of test.git
, I can do a push and pull, meaning it works as expected:
sudo chown -R git:testuser test.git/
sudo chown -R git:testuser test.git/*
git@192.168.1.10:/srv/repo/test.git
But I created repo using another user called testuser
, probably user and group owner of repo test.git
belong to testuser
, and push and pull will fail if I do NOT change the user owner of test.git
to git
: sudo chown -R git:testuser test.git/*
I'd like to add remote repo as: git://192.168.1.10/~testuser/srv/repo/test.git/
that use testuser
as user instead of git
user because I create test.git
under testuser
.