wkm
wkm

Reputation: 1762

Problem with git push and entering password

I've just setup an account on bitbucket and trying to import my repository for the first time.

I type this command:

git push -u origin --all

Then I am prompted for my password. When I hit enter a new line is inserted and nothing happens. I can also see my password on the screen. For example if my password was "mypassword" this is what it would look like after I run the command, hit enter, enter password and hit enter:

enter image description here

Thanks in advance!

Upvotes: 3

Views: 1692

Answers (3)

Norly Canarias
Norly Canarias

Reputation: 1736

ooh, this post is pretty old but,

when setting the remote repository try to use:

git remote set-url origin https://[email protected]/username/repo.git

instead of:

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

It worked for me.

Upvotes: 3

Uncle Tallest
Uncle Tallest

Reputation: 80

If you, like me, have problems using ssh authentication on bitbucket; this is how I fixed it. Bitbucket desires it's own separate ssh key for each individual user from what I can gather from the documentation.

Use your default method to make a new ssh key specifically for bitbucket (we'll call the ssh key 'id_pub_my_user_name.pub') and place something similar the following in ~/.ssh/config:

# bitbucket user - my_user_name
Host bitbucket.org
  HostName bitbucket.org
  User my_user_name
  IdentityFile ~/.ssh/id_rsa_my_user_name

If you now type in a terminal:

ssh -T [email protected]

It will now show you as authenticated, and you can happily go on from there.

Upvotes: 0

yasouser
yasouser

Reputation: 5177

If you are trying to get code from an existing bitbucket repo then you need to run this command:

git clone https://<your-user-name>@bitbucket.org/<your-user-name>/<project-name>.git

But if you are trying to push code to your bitbucket a/c from your local git repo, then see here for further help: Importing code from an existing project

Look to the section that says "Import an existing, unversioned code project to an empty repository".

Upvotes: 0

Related Questions