It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

unable to clone through git bash

i am using gitlab i have created one project in gitlab and when i am cloning the url i am facing the problem 

fatal: repository not found

1 answer

0 votes
Mikael Sandberg Community Leader Oct 01, 2019

Hi @kp hareesh,

Welcome to the Atlassian Community.

Did you the the clone URL from the project page in Gitlab? Did it look something like this:

git clone http://gitlab.<officedomain name>.in/<username>/<projectname>.git

i have tried this command along with that what are all the projects created in gitlab application those are all not reflecting in gitlab server.

Mikael Sandberg Community Leader Oct 01, 2019

Based on the URL I am guessing that you are using a self-hosted Gitlab environment? Did you get the URL from the project page in Gitlab? From what I can see from the Gitlab doc, if you get it from the /username namespace the URL is not correct, since that namespace only shows which repositories you have access to even if you are not logged on to Gitlab.

We are self hosted gitlab in our environment, iam gettting the url in git page, previously once the project was created in gitlab application it is reflecting in gitlab server but now projects is not reflecting in server 

when i am cloning the existing project url getting 

fatal: repository 'http://gitlab.tvstyres.in/C816/demo-project.git/' not found

for new project also facing same issuefatal: repository 'http://gitlab.tvstyres.in/C816/testing.git/' not found

in gitlab server demo-project is reflecting but newly created testing project is not reflecting in server

Mikael Sandberg Community Leader Oct 01, 2019

Maybe try adding your username, based on this thread I found on Gitlab community Gitlab is using the username and email setup on the machine. So based on that, try this:

git clone http://your_username@gitlab.tvstyres.in/C816/demo-project.git

Thanks for your support 

Tried but same issue again Authentication error

Mikael Sandberg Community Leader Oct 01, 2019

So with the username you get authentication failed error? Are you using Windows? Make sure that Credential Manager does not have your password stored, it has caused issues for my Bitbucket users from time to time.

Same issue facing again

Mikael Sandberg Community Leader Oct 01, 2019

Would you mind sharing the full error message you got when you added your username to the URL?

[root@GitLab ~]# git clone http://Hareeshkumar@gitlab.tvstyres.in/C816/testing.git
Cloning into 'testing'...
Password for 'http://Hareeshkumar@gitlab.tvstyres.in':
fatal: Authentication failed for 'http://Hareeshkumar@gitlab.tvstyres.in/C816/testing.git/'
[root@GitLab ~]#

Mikael Sandberg Community Leader Oct 01, 2019

Okay, so either the username or password is wrong. Make sure you are using the ones that are defined on your Gitlab server. Another option would be to use SSH instead, that way you do not have to worry about username and passwords, as long as it has been configured correctly in Gitlab.

If i use ssh i got this below error 

[root@GitLab ~]# git clone ssh://git@gitlab.tvstyres.in:C816/testing.git
Cloning into 'testing'...
ssh: Could not resolve hostname gitlab.tvstyres.in:c816: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
[root@GitLab ~]#

Mikael Sandberg Community Leader Oct 01, 2019

The ssh error seems to be an issue on the Gitlab server side, see https://gitlab.com/gitlab-org/gitlab-recipes/issues/46.

Another thing you could try is to also add your password to the http URL like this:

git clone http://your_username:password@gitlab.tvstyres.in/C816/demo-project.git

If the testing project is not showing up in Gitlab, my guess is that it is either private or it never got registered correctly on the server. I do not have access to Gitlab, I'm using Bitbucket, so not sure what needs to be done in Gitlab to set one up.

[root@GitLab ~]# git clone http://Hareeshkumar:Darling@1@gitlab.tvstyres.in/C816/testing.git
Cloning into 'testing'...
fatal: unable to access 'http://Hareeshkumar:Darling@1@gitlab.tvstyres.in/C816/testing.git/': Could not resolve host: 1@gitlab.tvstyres.in; Unknown error
[root@GitLab ~]#

Mikael Sandberg Community Leader Oct 01, 2019

Okay, so the client you are on does not know how to resolve the host name for your Gitlab server. Are you able to ping the IP address of your Gitlab server from your host? 

yah its pinging

Mikael Sandberg Community Leader Oct 02, 2019

If you can ping the IP address, try using it in your URL for the repository to see if that works.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Training & Certification

Atlassian University Live: Conquering Jira Permissions

Atlassian University Live webinars provide you and your teams with the chance to strengthen your Atlassian product skills, and learn directly from Atlassian experts. Our next webinar is titled Conq...

62 views 4 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you