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

2 votes
Accepted answer

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 Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

407 views 5 9
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