Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I cannot get Git to clone my repository.

Martin Svedlow
July 9, 2026

Can you please help with the following.  Thank you for your help.

I'm using Eclipse for my development.  When I use Eclipse 2020-03, I can clone the repository using the git clone command below in the URI text field directly  in Eclipse.  However, when using Eclipse 2024-09 and Eclipse 2026-06, the same git clone command in the text field does not work, so I tried using the Git commands in the Command Prompt window.  I would like to use Eclipse versions 2024-09 or 2026-06 if I can.

I am using Git version: git version 2.55.0.windows.2

I cannot get Git to clone my repository:.

JdbcCrudXX (the name of my repository)

I created the token: JdbcCrudXX_token

The instructions (with the token redacted) are listed below.

I'm using Windows11.  I opened a Command prompt window and navigated to the location of the code in my Eclipse workspace:

C:\...\...\git\JDBC_New_XX

When I run the command:

git clone https://x-token-auth:<INSERT_TOKEN_HERE>@bitbucket.org/username/jdbccrudXX.git

I get the following error message:

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/'

Instructions Displayed When Create Token (Token Is Redacted)

Your access token: "JdbcCrudXX_token"

Record this token somewhere secure, it can't be viewed or retrieved once you close this window.

<INSERT_TOKEN_HERE>

How to use this token with APIs

Provide this token in the Authorization header as a bearer token when making requests to Bitbucket APIs, for example:

Authorization: Bearer <INSERT_TOKEN_HERE>

How to use this token with your Git repository

To clone this repository using this token, run:

git clone https://x-token-auth:<INSERT_TOKEN_HERE>@bitbucket.org/username/jdbccrud26.git

To use this token to push code to this repository, set the Git author on the cloned repository by running the following code snippet in your terminal:

git config user.email <INSERT_EMAIL_TOKEN_HERE>@bots.bitbucket.org

1 answer

1 accepted

0 votes
Answer accepted
Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 9, 2026

Hi Martin, the problem is the username in front of your token, not the token itself. The x-token-auth prefix you're using is only for a Bitbucket repository or workspace Access Token. If what you generated is an Atlassian API token, which is the new type now that app passwords are being retired, git wants a different username, x-bitbucket-api-token-auth.

So for an API token the URL is:

git clone https://x-bitbucket-api-token-auth:YOUR_API_TOKEN@bitbucket.org/username/jdbccrudXX.git

and the token needs the read:repository:bitbucket scope for a clone. If you did create a repository or workspace Access Token instead, then x-token-auth is correct and you would check that the token has repository read and has not expired.

The old Eclipse still working is almost certainly a cached credential. Windows keeps it in Credential Manager under a bitbucket.org entry, and your newer setup is re-sending that stale one. Delete the bitbucket.org entries under Control Panel > Credential Manager > Windows Credentials, then clone again so it prompts fresh with the right username and token.

One thing on timing, app passwords are in their deprecation brownout right now and stop working entirely on 28 July 2026, so moving to an API token is the right direction. Atlassian's deprecation notice has the timeline and the switch to API tokens: https://community.atlassian.com/forums/Bitbucket-articles/Deprecation-notice-Bitbucket-Cloud-app-password-brownout/ba-p/3237429

Martin Svedlow
July 10, 2026

Gabriela,

Thank you very much for your response.

I checked the Windows Credential Manager and there are no 'bitbucket.org' entries.

Below are the steps I tried. I'm using 'x-token-auth' because that is the only option Bitbucket provides. I tried using Eclipse and then tried using the Git commands directly in the Window Command Prompt window.

I use Eclipse for my development IDE. Below is the success/fail story for different Eclipse versions. Because the clone operation is successful for Eclipse 2020-03 indicates to me that the problem is with Eclipse.

Clone worked : Eclipse 2020-03
Clone Did Not Work: Eclipse 2020-12, 2021-12, 2022-12, 2023-12, 2024-09, 2024-12, 2025-12, 2026-06

Since Eclipse is not working for the most recent versions of Eclipse, is there a way I can use the Command Prompt window to perform the clone operation?

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/'

Again, thank you for your help.

--------------------------------------------------------------------------------
Steps I Tried
--------------------------------------------------------------------------------
1. Bitbucket > JdbcCrudXX > Left-Click > ... > Settings
2. Select > Security > Access tokens
      2.1 The only options under 'Security' are 'Access keys' and 'Access tokens'
      2.2 I selected 'Access tokens'
      2.3 There is not an option for 'Atlassian API token'
3. Access tokens page is displayed
      3.1 Press > Create access token button
      3.2 Create access token page is displayed
               3.2.1 Name: JdbcCrudXX_03_token
               3.2.2 Expiry: 7/1/2027
               3.2.3 Scopes Checked: Write, Admin, Delete
               3.2.4 Press > Create button
      3.3 Access token created page is displayed
               3.3.1 Select > All Text > Copy/Paste to Word Document > Save Word document
               3.3.2 Press > Close button
4. Try to clone Git repository in Eclipse
      4.1 Command
               4.1.1 git clone https://x-token-auth:<TOKEN>@bitbucket.org/username/jdbccrudXX.git
      4.2 Eclipse 2024-09
               4.2.1 Paste command into URI text field in Source Git Repository dialog
               4.2.2 Press > Next button
               4.2.3 Clone DID NOT WORK
      4.3 Eclipse 2020-03
               4.3.1 Paste command into URI text field in Source Git Repository dialog
               4.3.2 Press > Next button
               4.3.3 Clone WORKED
5. Try to clone Git repository using Windows Command Prompt window
      5.1 Open > Command Prompt window
      5.2 cd > C:\...\git\TestCloneXXUsing2024-09
      5.3 Copy/Paste > git clone https://x-token-auth:<TOKEN>@bitbucket.org/username/jdbccrudXX.git
      5.4 Error response (see Error Response)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2026

Hi @Martin Svedlow 

As we'll need you to share verbose logs (which wouldn't be appropriate to share on a public forum) - please raise a support ticket using your paid workspace URL:

If you're unable to raise a ticket - please let me know your timezone so I may raise one on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)

Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 12, 2026

x-token-auth is actually right for the repository token you made. It'd only be the wrong username if you'd generated an Atlassian API token instead, which you didn't. So that part's fine.

Most often that "you may not have access" error on an otherwise-valid token is the scope. A repository Access Token created without the Repositories Read scope ticked fails exactly like this, even when it looks fine. Open it under the repo's Settings > Security > Access tokens and check Read is on, or make a fresh one with Repositories: Read.

The other thing is the path. The clone URL wants your workspace ID, not a username, so bitbucket.org/<workspace>/<repo>.git. Your command has "username" sitting where the workspace slug belongs. If that isn't your exact workspace, that by itself throws this error.

From Command Prompt:

git clone https://x-token-auth:<TOKEN>@bitbucket.org/<workspace>/jdbccrudXX.git

If both check out and it still dies, Ben's right, verbose logs will show what's actually getting rejected. Worth ruling those two out first though, they're usually it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events