Authentication failed while cloning repository from bit bucket

I am getting following authentication failed error while cloning repo from bit bucket.

$ git clone https://sharpriy@bitbucket.org/humense-team/k2ls.git
  Cloning into 'k2ls'...
  Password for 'https://sharpriy@bitbucket.org':
  remote: Invalid username or password. If you log in via a third party service you   must ensure you have an account password set in your account profile.
 fatal: Authentication failed for 'https://sharpriy@bitbucket.org/humense-team/k2ls.git/'

I have given gmail password for authentication since i use to login to atlassian account using 'log in with gmail' option.

I have also added SSH key to bit bucket account and configured username and email address using following commands

git config --global user.name <username>

git config --global user.email <email address>

 

Please help me to resolve this issue

1 answer

1 accepted

Hi Priya,

For SSH try using

git clone git@bitbucket.org/humense-team/k2ls.git

 For username and password the error shows

If you log in via a third party service you must ensure you have an account password set in your account profile.

That command needs one small formatting fix:

git clone git@bitbucket.org:humense-team/k2ls.git

Thanks James!

This worked!!!

Thank you very much Edwin and James.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

643 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot