Hi all,
I'm trying to setup a remote git server on my Synology NAS. It took me the entire last weekend and I tried any solution found in the web without success. The remote git server runs on the NAS and I can connect via SSH, I can create an empty remote git repository. Now I tried to clone this to my local machine, but this failed. However, I already have a project with a local git repository for which I want to create a remote repository on my NAS. Here is what I already tried:
1.) create an empty remote git repository for testing purposes: git init --bare test.git
Then I tried to clone to local using: git clone ssh://gituser@[NAS name]:/repos/test/test.git
2.) Copy the local git repository to the NAS. Then I added the remote repository to Xcode 9 and tried to push to remote. I was asked for the gituser password and then I got the error message from Xcode: "does not appear to be a git repository" Error -20
3.) I also tried to do the push from the bash to see a better error description, I got this error:
fatal: '/repos/test/test.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
4.) Now I tried the same things with an empty git repository, I tried to push and got the same error. I tried to clone and got the same error.
I checked the git versions, but I think normally this should not really matter (yes, they are different. the NAS has 2.11.3, Xcode 9 comes with 2.13.6). I also added the ssh keys to the home folder of the gituser. The git repositories are located inside the home of the gituser (and I also tried another special folder, which also did not work.
I'm not sure how to proceed now. Can anybody help me, any idea? Or does anybody know a good tutorial for someone with limited knowledge about bash? It just can't be that hard? I think this there is only one small thing missing, but what is missing now? It seems, most tutorials are out of date - I'm using DSM 6.1.4-15217 Update 2.
Sorry, I think it does not have so much to do with Xcode or Apple, but perhaps someone can help me and others having the same issues like me?
Best regards and much thanks in advance!
Jürgen