Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when push commits with Github: fatal: could not read Username

Tags:

git

github

Since few time, I use Github for my projects and I have an issue when I want to push commits.

To beginning, I have forked a repository. Then I have cloned the fork (with command line git clone https://github.com/ ...) and, after doing modifications, I have committed with success (git commit -a).

After this, I have tried to push commits with command line git push but I obtain the following error:

fatal: could not read Username for 'https://github.com': No such file or directory 

Have you got an idea to resolve this issue?

like image 917
JohnDoe66 Avatar asked Jan 01 '14 18:01

JohnDoe66


2 Answers

What I had to do was:

git remote rm origin
git remote add origin '[email protected]:username/repo.git'

Then, I was able to push my changes.

like image 133
Rodrigo Medeiros Avatar answered Sep 19 '22 11:09

Rodrigo Medeiros


I tried following command and it worked for me

git push https://<username>:<password>@github.com/<username>/<repository-name> 
like image 26
Pulkit Avatar answered Sep 20 '22 11:09

Pulkit