1

I have a problem with own git server on which I only use the git-http-backend. I discover that after I create the empty repository on the server with this:

git init --bare

I can clone the empty repo on any host with any user,

git clone https://example.com/nameOfRepo.git

but after I make a change the repository is only working with one host.

git add filename
git commit -m "message"
git push

In conclusion after change is made the repository is assigned to one host. I can't clone the repository to another host. Do You have idea what is wrong?

EDIT:

On server I do:

mkdir repoName.git
cd repoName.git
git init --bare

On first host I make:

git clone https://example.com/repoName.git
touch filename.txt
git add filename
git commit -m "Initial commit"
git push

After that I try to clone repo to second machine with that:

git clone https://example.com/repoName.git

and this failed with this:

fatal: The remote end hung up unexpectedly

After that I try to clone repo on first machine but to another directory:

mkdir repoNameNew.git
cd repoNameNew.git
git clone https://example.com/repoName.git

but this is failed too with

fatal: The remote end hung up unexpectedly
Psottek
  • 31
  • 4
  • What change did you make? – evolutionxbox May 15 '18 at 09:26
  • I add file and make commit, then push. – Psottek May 15 '18 at 09:28
  • We're not psychic... please may you amend the question with the change you made.? – evolutionxbox May 15 '18 at 09:51
  • So by "is only working with one host." you mean that you are not able to clone the repository from another machine?! – kowsky May 15 '18 at 11:03
  • Not only. Even if I init local repo and add remote, I can't pull anything. But I found that I have the 504 error (Gateway timeout) but it is not possible because I check two machine in both way and always if one make change it blocks another. The second issue is that even if i want clone the repo to another directory on which git is working I can't do that. Very strange and confussed for me. – Psottek May 15 '18 at 11:04
  • If you use `git clone`, you don't have to use `git init`. `git clone` initializes a repository, sets the remote and fetches from it (see [documentation](https://www.git-scm.com/docs/git-clone)). – kowsky May 15 '18 at 11:09
  • I know. But the second try was create local repo and pull the changes to it from remote. – Psottek May 15 '18 at 11:11
  • It's still not clear what exactly you did and what the problem is. You used `git init --bare` and then `git clone` to create a local copy. You made changes, committed and pushed. Now you cannot clone the repository any more? Which error message are you getting *excactly* ? Can you provide the exact git commands you used? – kowsky May 15 '18 at 11:13
  • I edit my question to be more clear. – Psottek May 15 '18 at 11:24

0 Answers0