Can't clone repo although connected through SSH
Asked by demonLaMagra:

Hello all,

I'm wondering if you could give me some guidance. I have an issue where Sourcetree is connected through SSH and find all of my private repos on BitBucket but for some reason, I can not clone them. I get an error "This is not a valid source path/URL".

![SSH Connected to account.png](/t5/image/serverpage/image-id/24946i617BC357657A07BB/image-dimensions/450x300?v=v2 "SSH Connected to account.png")

But when selecting clone on any of the Repos shown behind I get the error above.

Any ideas? I have followed the tutorial on the BitBucket website and have set up all of the SSH Keys. I have wondered if it is anything to do with the PROXY we are behind at work, but when adding the proxy in to the settings, the account fails to Authenticate.

Cheers in advance


Answers:
author: Julian Governale
body: Can you clone directly by click "Clone" at the stop and then providing the SSH url to the repo?

comments: author: demonLaMagra
body: Managed to yesterday by changing from SSH to HTTPS but today this not working either.

Now get the following when cloning or committing.

```
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://demonLaMagra@bitbucket.org/demonLaMagra/bray.git
Output: 
Error: 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://demonLaMagra@bitbucket.org/demonLaMagra/bray.git/'
```


author: Julian Governale
body: It seems to not be accepting your user name or password, validate you can access bitbucket.org with the same credentials. If you are using OAuth, open the source tree preferences / tools and go to your account / authentication tab and refresh your oAuth token.


author: demonLaMagra
body: Thanks for the response. I have done this and everything works fine in regards to logging in and finding all of my remote repositories, but I can not seem to clone or push. I still get the same error message as before.


author: minnsey
body: Hi   

Try explicitly logging out of the Bitbucket website and then log back in. Its possible that too many failed logins somewhere along the way have partially locked you account.   

To be really thorough you can also deleted any 'git:' prefixed entries for Bitbucket in the Windows Credential Manager, this will force git to re-prompt you for credentials before doing a fetch/pull/push


author: minnsey
body: Hi  

Is there any additional information behind the *Details* button when the clone fails?

comments: author: demonLaMagra
body: So I managed to clone the repo yesterday by changing from SSH to HTTPS but today, This is no longer working. When trying to commit or clone I am now seeing the following.

```
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://demonLaMagra@bitbucket.org/demonLaMagra/bray.git
Output: 
Error: 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://demonLaMagra@bitbucket.org/demonLaMagra/bray.git/'
```