0
  1. I created a 'New Project' through GitLab.
  2. I verified that "/var/opt/gitlab/git-data/repositories/root/test.git" exists, I even chmod'ed it to 777
  3. I logged in via ssh manually (git@*****.net) and it worked fine, I could access the repository files from my home computer via ssh.

But when I do this from my home computer:

         git remote add origin git@*******.net:root/test.git 
         fatal: Not a git repository (or any of the parent directories)

I have added my SSH certificate through GitLab as well.

When I try to clone the project, I get the same error:

C:\Program Files (x86)\Git\bin>git clone git@*******.net:root/test.git
Cloning into 'test'...
git@d*******.net's password:
fatal: 'root/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.

test.git:

 drwxrwx--- 7 git git 4096 Jan 28 15:55 ./
 drwxrwx--- 8 git git 4096 Jan 28 19:00 ../
-rwxrwxrwx 1 git git   66 Jan 28 15:15 config*
-rwxrwxrwx 1 git git   73 Jan 28 15:15 description*
 drwxrwxr-x 7 git git 4096 Jan 28 15:56 .git/
 -rwxrwxrwx 1 git git   23 Jan 28 15:15 HEAD*
 lrwxrwxrwx 1 git git   47 Jan 28 15:15 hooks 
 drwxrwxrwx 2 git git 4096 Jan 28 15:15 info/
 drwxrwxrwx 4 git git 4096 Jan 28 15:15 objects/
 drwxrwxrwx 4 git git 4096 Jan 28 15:15 refs/
Kristian
  • 1,348
  • 4
  • 16
  • 39

1 Answers1

1

The error you get is probably caused by repository not being inited. The easiest way, if you're working with github, is to clone the project you've created at 1. Also see How do I clone a github project to run locally?

Then you'll be able to configure remotes and push specs.

 git clone git://github.com/yourgithubusername/test.git
Community
  • 1
  • 1
Shine
  • 3,788
  • 1
  • 36
  • 59
  • the clone URL should be in format git clone ssh://git@github.com/authorName/ProjectName.git – Shine Jan 29 '15 at 00:15
  • unfortunetelly I have not. I have tried all possible 'paths' when I imported. weirdly I can login via ssh as 'git' user just fine, but not through git. – Kristian Feb 02 '15 at 10:48