Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot push to Bitbucket via https anymore: git returns fatal error

Tags:

git

bitbucket

I recently reinstalled windows and got the latest version of git. I created a new repo on Bitbucket and ran

git remote add origin https://[email protected]/MYUSERNAME/test.git

then I ran

git push -u origin --all

however this gave me the error

fatal: could not read Password for 'https://[email protected]': No such
file or directory

before I would just get a prompt asking me for my username and password, and the push worked fine. I've tried reverting to Git 1.7.11 but this didn't do anything.

like image 229
Jabbath Avatar asked Jan 05 '14 00:01

Jabbath


People also ask

What is the push command in git?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.


1 Answers

I solved this by adding my password in the url.

Instead of:

git remote add origin https://[email protected]/MYUSERNAME/test.git

I used:

git remote add origin https://MYUSERNAME:[email protected]/MYUSERNAME/test.git
like image 163
Eidan Spiegel Avatar answered Nov 13 '22 05:11

Eidan Spiegel