• Register
0 votes

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


6 5 3
7,540 points

1 Answer

0 votes

Solution :

I had faced the exact same problem in the recent past. The problem had occurred when I tried to clone using the HTTPS URL and after that I tried to push the changes using my Git Bash on the Windows using below command:

git clone https://github.com/{username}/{repo}.git

But, when I tried using the SSH URL as below to clone it, Above problem didn't occur:

git clone git@github.com:{username}/{repo}.git



I had the same problem in the recent past, as I did not get any help at that time, so I have decided to post my solution that worked for me.

Few Points to remember :

1.       The SSH key must be generated

2.       The SSH key must be added to github.

3.       After that I had created the new repository on GitHub for my project and followed the steps.

As the command line tool I used was the GitShell for Windows also I use Terminal.app on my Mac. The GitShell is the official GitHub tool and can be downloaded from the following link : https://windows.github.com/

Hope this solution helps someone who has the same problem.

9 7 4
38,600 points

Related questions

0 votes
1 answer 2.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
0 votes
1 answer 192 views
Problem: I am having only basic knowledge of git. Now I am trying to clone the project from a gitlab to my own local machine. I have already been granted rights as the developer on it and I have used the command as 'git clone’. But none of the ... “Remote: The project you were looking for could not be found.” Any help in fixing my git related error would be highly appreciated.
asked Sep 4 Raphael Pacheco 4.9k points
0 votes
1 answer 676 views
Problem : I am working on the project remotely through the command line on the machine to which I don't have the admin rights and after running git push origin master I get the below error message: (gnome-ssh-askpass:29241): Gtk-WARNING **: cannot open ... to host github.com port 22: Connection timed out fatal: The remote end hung up unexpectedly Does anyone have any solution for my issues?
asked Dec 11, 2019 alecxe 7.5k points
0 votes
1 answer 53 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?
asked Jan 16 jwilliam 3.9k points