# Proper syntax to pull repo from Bitbucket with API token

**URL:** <https://community.developer.atlassian.com/t/proper-syntax-to-pull-repo-from-bitbucket-with-api-token/101182>\
**Category:** Bitbucket Cloud\
**Tags:** git, api-token\
**Created:** [June 10, 2026, 8:52am UTC](https://community.developer.atlassian.com/t/proper-syntax-to-pull-repo-from-bitbucket-with-api-token/101182 "2026-06-10T08:52:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnrulyNatives](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/unrulynatives/32/55881_2.png) [@UnrulyNatives](https://community.developer.atlassian.com/u/UnrulyNatives)\
**Post date:** [June 10, 2026, 8:52am UTC](https://community.developer.atlassian.com/t/proper-syntax-to-pull-repo-from-bitbucket-with-api-token/101182/1 "2026-06-10T08:52:28Z")

</div>

Atlassian [deprecated](https://developer.atlassian.com/cloud/bitbucket/changelog/#CHANGE-3222) ability to pull repos with use of a password.

I use Linux Ubuntu VPS at Linode. I am unable to figure out the proper format of the pull command. Please help.

I triad over 20 variations of the syntax, but to no effect.

Theoretically, this one should work: Please take a look at my stackoverflow question.  
Source - [https://stackoverflow.com/q/79954842](https://stackoverflow.com/q/79954842)

```auto
git pull https://x-token-auth:<APItoken>@bitbucket.org:443/<repoownerpublicname>/<reponame>.git

```

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![SchumanZhang](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@SchumanZhang](https://community.developer.atlassian.com/u/SchumanZhang)\
**Post date:** [June 11, 2026, 1:10am UTC](https://community.developer.atlassian.com/t/proper-syntax-to-pull-repo-from-bitbucket-with-api-token/101182/2 "2026-06-11T01:10:29Z")

</div>

Hi @UnrulyNatives , the correct syntax is

`git pull https://x-bitbucket-api-token-auth:<API_TOKEN>@bitbucket.org/<workspace>/<repository>.git `

See official docs here [Using API tokens | Bitbucket Cloud | Atlassian Support](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/)

---

<div class="post-metadata">

**Author:** ![UnrulyNatives](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/unrulynatives/32/55881_2.png) [@UnrulyNatives](https://community.developer.atlassian.com/u/UnrulyNatives)\
**Post date:** [June 11, 2026, 2:46am UTC](https://community.developer.atlassian.com/t/proper-syntax-to-pull-repo-from-bitbucket-with-api-token/101182/3 "2026-06-11T02:46:36Z")

</div>

Thank you.

I strongly recommend that this info be announced in your notice disseminated to users like me.  
Also, some of us might lose extra time by generating the regular API token, and not the one with scopes.

Thank you again.
