Forums

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

Can't log in using API tokens

Stephane Saux
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2025

Created a token then used:

git clone https://[my username]:ATATT...@bitbucket.org:HearstNP/wcm_central.git wcm
Cloning into 'wcm'...
fatal: unable to access 'https://bitbucket.org:HearstNP/wcm_central.git/': URL rejected: Port number was not a decimal number between 0 and 65535

Where ATATT.... is my token.

1 answer

0 votes
Vitalii Rybka
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 Leaders.
June 27, 2025

Hey Stephane,

That's a URL formatting issue - you've got an extra colon in there that's confusing git about the port number.

The problem: Your URL has bitbucket.org:HearstNP which git is interpreting as trying to use "HearstNP" as a port number.

Fix: Remove the colon before your workspace name:

git clone https://[your-username]:ATATT...@bitbucket.org/HearstNP/wcm_central.git wcm

Bitbucket URL format should be:

Alternative approach: You can also configure git to use the token globally:

git config --global credential.helper store

Then just use the regular clone URL and enter your token when prompted.

Double-check:

  • Make sure your API token has the right permissions (repositories read/write)
  • Verify the repository name and workspace are correct

That should get you sorted! Drop me a line if you're still having issues with the authentication.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events