• Register
0 votes
41 views

Problem :

I am unable to clone my Git repository and getting below error:

​/c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or directory



​

How can I fix the above error?

7 5 2
3,870 points

1 Answer

0 votes

Solution :

It seems to me like the permissions issue and not the Windows 7 issue.

Your ssh key is not authorized so you are getting - Permission denied (publickey).

You need to create the public ssh key and then ask your administrator of your Git repository to add your ssh public key

OR

For the people those have come here and are just trying to get their repository and who don't care about the protocol name (ssh / https), those might just want to use the https instead of the ssh (if it's just supported).

So for e.g. you can use below command.

git clone https://github.com/%REPOSITORYFOLDER%/%REPOSITORYNAME%.git

Instead of the below command.

git clone git@github.com:%REPOSITORYFOLDER%/%REPOSITORYNAME%.git

 OR

 If you are still facing the issue around the access even after creating the SSH and adding it in the Bitbucket account or wherever you wanted to, you need to write the following in terminal on the GitBash, OSX or Linux:

# Lists already added identities (‘ssh keys’)
ssh-add -l

Then, if you still don't see your key listed then you can add it with the following

# Add a new realname
ssh-add ~/.ssh/ realname

This simply worked for me.

9 7 4
38,600 points

Related questions

1 vote
1 answer 74 views
74 views
Problem : I am unable to clone my Git repository, and getting below error: /c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or dir Please let me know any pointers to resolve my error.
asked Dec 30, 2019 alecxe 7.5k points
0 votes
2 answers 148 views
148 views
Problem : When ever I try to push to a shared git remote I get the following error remote: error: insufficient permission for adding an object to repository database ./objects
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
1 answer 1.6K views
1.6K views
Problem : I have the below problem when I just try to pull code, using my GIT Bash on windows Even after adding/removing the origin I am still facing the same error as below. Fatal: could not read Username for 'https://github.com': No such file or directory
asked Dec 19, 2019 alecxe 7.5k points
0 votes
1 answer 2K views
2K views
Problem : I created my private repo examplessite/myprivaterepo using my Github UI from my browser. Then I went to my go directory which is on my desktop and tried to clone it: $ cd $GOPATH $ go get github.com/examplessite/myprivaterepo So far so good. I created ... .com/examplessite/myprivaterepo: exit status 128 Why is the laptop ignoring my own repo and how can I make it to accept its luck?
asked Dec 17, 2019 alecxe 7.5k points
1 vote
1 answer 47 views
47 views
Problem : I have recently started to learn the GIT. I was working on my GIT and suddenly I started facing below error. &ldquo;Fatal: not a git repository (or any of the parent directories): .git&rdquo; As I am very new to GIT so I am unable to understand above error ... the error from past couple of days but unable to fix it. Is there anyone who can spare some time and guide me to fix above error?
asked Mar 30 morrisBson 3.2k points