2

I have a server where I have installed gitlab and have created a project. I modified the post-receive hook where I declared the working tree and the git repo. After that I cloned my project to my local machine and everything went perfectly. When I tried to push I got the following error.

git.exe push --progress "origin" master:master Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (10/10), 1.35 KiB | 0 bytes/s, done. Total 10 (delta 3), reused 0 (delta 0) remote: GitLab: The project you were looking for could not be found. To ssh://server/path/repo.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'ssh://git@server/path/repo.git' git did not exit cleanly (exit code 1) (6240 ms @ 11/23/2016 2:35:10 PM) 

It says that the project could not be found but I was able to pull it. Gitlab and the repo are on the same server.

If anyone has any fix, it would be greatly appreciated.

8
  • Can you show the result of git remote -v? The URL you're pushing to looks odd. Commented Nov 23, 2016 at 13:45
  • And what Gitlab version are you using? It looks really ancient Commented Nov 23, 2016 at 13:54
  • @das_j GitLab Community Edition 8.13.6 Commented Nov 23, 2016 at 13:59
  • @Collin is the same url from that command Commented Nov 23, 2016 at 13:59
  • Was hoping to see ground truth on both your push and pull URLs. GitLab doesn't typically refer to repositories by a full path like that Commented Nov 23, 2016 at 14:03

3 Answers 3

2

It seems you have a bad remote address. You can check your remote address using

git remote show origin 

It must appear something like:

Push URL: git@<address>:<project>/<repository_name>.git 

If you have a bad address, starting with ssh:// or something like that, try changing remote address:

git remote set-url origin git://new.url.here 

Proper address will appear in Gitlab project page. You can find more info using git help remote

Sign up to request clarification or add additional context in comments.

2 Comments

I tried that and I received fatal: Unable to look up git://gitlab_project_path (port 9418) (A non-recoverable error occurred during a database look-up.
It seems you have a problem with gitlab database configuration, check it
2

For this I had to create a personal access token https://gitlab.com/profile/personal_access_tokens

Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS.

For example: enter image description here

Comments

1

Change Permission for your repository

Go to setting->Permissions

Click on Expand

Then change Project visibility to

Internal or Public

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.