I tried the following using the Command Prompt window:
git clone https://x-token-auth:<TOKEN>@bitbucket.org/username/jdbccrudXX.git
With the error response:
Cloning into 'jdbccrudXX'...
remote: You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated.
fatal: Authentication failed for 'https://bitbucket.org/username/jdbccrudXX.git/'
Hi Martin
Bitbucket deprecated the old app password / token flow for HTTPS cloning a while back.
If you're using a repository access token, double-check that it was generated with READ permission on the repository scope.
Workspace-level tokens won't work for cloning unless you explicitly grant repo access.
Quick diagnostic:
run git ls-remote https://x-token-auth:<TOKEN>@bitbucket.org/username/jdbccrudXX.git
If that also fails with the same auth error, it confirms the token itself lacks the right scopes. Regenerate it from Repository Settings > Access Tokens and make sure "Read" is checked.
Let us know what you find.
Cheers
Ajay
Ajay,
Thank you for the suggestion.
I tried the steps below, but was not successful.
I must be doing something wrong. I just cannot figure out what it is.
As a note, I'm using Eclipse 2020-03 and the git command given in the Access Token Created page works fine:
git clone https://x-token-auth:<token>@bitbucket.org/username/jdbccrud26.git
However, when tried later Eclipse releases (e.g., 2020-12) the git clone operation does not work.
Again, thank you for your help.
Marty
------------------------------------
Step 1:
I created a new token for the repository JdbcCrud26 as shown in Figure 1 with only Read access to try your suggestion.
------------------------------------
Step 2: The Reponse Access Token Created Page with the Token (shown as '<token>' below.
Access token created
Your access token: "JdbcCrud26_04_token_read"
Record this token somewhere secure, it can't be viewed or retrieved once you close this window.
<token>
------------------------------------
Step 3:
I opened a Windows Command Prompt window and navigated to the location where I wanted to clone the repository
C:\Users\basefolder\git\TestClone26
------------------------------------
Step4
Pasted the following commands separately:
git ls-remote https://x-token-auth:<token>@bitbucket.org/username/JdbcCrud26.git
git ls-remote https://x-token-auth:<token>@bitbucket.org/username/jdbccrud26.git
------------------------------------
Step 5: Result
remote: You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated.
fatal: Authentication failed for 'https://bitbucket.org/username/JdbcCrud26.git/'
-----------------------------------
Figure 1 Create Access Token Dialog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.