Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

unable to clone through git bash

kp hareesh October 1, 2019

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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:

kp hareesh October 1, 2019

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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.

kp hareesh October 1, 2019

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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

kp hareesh October 1, 2019

Thanks for your support 

Tried but same issue again Authentication error

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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.

kp hareesh October 1, 2019

Same issue facing again

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 2019

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

kp hareesh October 1, 2019

[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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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.

kp hareesh October 1, 2019

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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.

kp hareesh October 1, 2019

[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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 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? 

kp hareesh October 1, 2019

yah its pinging

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 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
TAGS
AUG Leaders

Atlassian Community Events