youngmon/atlassian-qna huggingface dataset:
HTTP 406 error when calling 'Get log file for a step' Bitbucket Pipelines API
Asked by Stuart Swain:

When running the following code, as per [this](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-steps-step-uuid-log-get) link:  

```
import requests
import os

workspace = "redacted"
repo_slug = "redacted"
token = os.getenv('BB_TOKEN')
pipeline_uuid = "{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}"
step_uuid = "{ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj}"

url = f"https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log"

headers = {"Accept": "application/json", "Authorization": f"Bearer {token}"}
response = requests.request("GET", url, headers=headers)

print(response.text)
```

I get the following:

```
{"code": 406, "message": "HTTP 406 Not Acceptable"}
```

The pipeline_uuid and step_uuid are 100% correct (obviously altered in these examples).

By comparison, the following script works perfectly - the only difference is the url:

```
import requests
import json

workspace = "redacted"
repo_slug = "redacted"
token = os.getenv('BB_TOKEN')
pipeline_uuid = "{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}"

url = f"https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/"

headers = {"Accept": "application/json", "Authorization": f"Bearer {token}"}
response = requests.request("GET", url, headers=headers)

print(response.txt)
```

Is the API simply broken:

```
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log
```

Or am I missing something?


Answers:
author: Aron Gombas
body: I checked out the documentation of the corresponding REST API endpoint and they don't even list 406 as a possible response status code:

<https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-steps-step-uuid-log-get>

If you're 100% sure that the two uuid's are correct and that they correctly replaced in the URL template (i.e. the final URL) is correct, then it may be a bug in Bitbucket.

If I were you, I'd try to send the same request, same URL, same headers from Postman to see if there is nothing obviously broken with it.

comments: author: Stuart Swain
body: Ok... worked in Postman with the same (resolved) URL, so I checked for what else was different...

I was using the following headers:

```
headers = {"Accept": "application/json", "Authorization": f"Bearer {token}"}
```

.. which I stole from another request I was using - didn't respect that the fact that is was only accepting 'application/json' - my bad.

The docs don't specify a header at all, so I just didn't read them properly.

I changed the headers to:

```
headers = {"Accept": "*/*", "Authorization": f"Bearer {token}"}
```

.. and it now works perfectly.

Thanks for your help.


Tags: bitbucket-cloud

cloud
Is there any way to show more branches on the cherrypick branch list?
Asked by SeaNoon:

Hello, I'm using bitbucket server/client in my company.

When I do cherrypick from pushed commit, I cannot find the target branch from list.

Is there any way to show more branches or,

specify rules to show? (like prefix 'release' or 'product')

Below screenshot is a popup by cherry-pick button on the commit page.

Yellow highlighted list box shows only 50 branches and I don't know how it produces the list by any priorities.

![cherrypick_list.png](https://community.atlassian.com/t5/image/serverpage/image-id/249881iC7231EAA7A212029/image-size/large?v=v2&px=999 "cherrypick_list.png")


Answers:
author: SeaNoon
body: Does anyone know about this?


Tags: bitbucket-server

cherry-pick

server
Skip a file during creation of zip
Asked by Robin:

I want to skip a file named .gitignore during creation of the zip i tried -x and --exclude command but it is not working here is my code .

```
pipelines:  branches:    main:      - step:          name: Copy code as ZIP file          script:            - apt-get update && apt-get install -y zip            - git archive --format=zip HEAD -o code.zip -x .gitignore          artifacts:            - code.zip

```

I searched on forum but cannot find any solution


Answers:
author: Syahrul
body: G'day [@Robin](/t5/user/viewprofilepage/user-id/5152565)

Based on your YML parameter, you can't use -x on the git archive. Instead, try the following example to exclude .gitignore

```
pipelines:  branches:    main:      - step:          name: Copy code as ZIP file          script:            - apt-get update && apt-get install -y zip            - git archive --format=zip HEAD -o code.zip ":(exclude).gitignore"          artifacts:            - code.zip?
```

Use ":(exclude).gitignore" to skip .gitignore when it's archiving.

I hope this helps.

Cheers,  
Syahrul

comments: author: Robin
body: + git archive --format=zip HEAD -o code.zip ":(exclude).gitignore/"  
fatal: There is nothing to exclude from by :(exclude) patterns.

Perhaps you forgot to add either ':/' or '.' ?

Not working for me this is from logs.


author: Syahrul
body: Hey [@Robin](/t5/user/viewprofilepage/user-id/5152565)

Interesting, this works as expected on my end. As you can see on the screenshot below, it skipped the .gitignore when creating the zip file:

![Screenshot 2023-04-06 at 3.21.18 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/250156iCA62D92D53022DDD/image-size/large?v=v2&px=999 "Screenshot 2023-04-06 at 3.21.18 PM.png")

May I know what image are you using? I've read that older git may have issues using (exclude) parameters. I'm using the default image "  
atlassian/default-image:3".  
Could you try changing the image and see if that works?  
Cheers,  
Syahrul


author: Robin
body: Thank u so much after changing image it worked .


Tags: bitbucket-cloud

cloud
Bitbucket account repository in 2015
Asked by android_logicgrabber:

Hi Bitbucket,

In 2015, I had a lot of repositories and worked on almost 10+ projects with Bitbucket, after that, I got some health problems - and lost touch and everything from IT.

After 2016 around, I had never seen my repository. now I am back to track in 2023 after a long time.   

Now, all my repositories are gone !! all my projects are gone from Bitbucket!

Anyone can help me? what I can do in this situation?

<br />

I have 4 bitbucket accounts and none of them have any of the repositories!   

What should I do?


Answers:
author: Theodora Boudale
body: Hi [@android_logicgrabber](/t5/user/viewprofilepage/user-id/5188312),

Were these repositories Mercurial or Git?

Atlassian made a decision to move away from maintaining and supporting Mercurial repositories in 2019. This was announced in community:

* <https://community.atlassian.com/t5/Bitbucket-articles/What-to-do-with-your-Mercurial-repos-when-Bitbucket-sunsets/ba-p/1155380>

and on our blog:

* <https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket>

In 2020 Mercurial repos were disabled and they have since been deleted from our platform. Bitbucket Cloud Support team is no longer able to restore those repositories.

If the repositories owned by these accounts were Mercurial repos, and if they were public, you can check if they have been archived by Software Heritage:

* <https://bitbucket-archive.softwareheritage.org/>

If the repositories owned by these accounts were Git repos, we do not delete any repositories because of inactivity. If you cannot find them, they were either deleted or transferred to another workspace by a user that had admin access. In case of deletion, the Support team can help recover core repository content only, as long as the deletion happened within the last 7 days. We are unable to recover metadata or any content that was deleted past 7 days:

* <https://confluence.atlassian.com/bbkb/does-bitbucket-backup-my-repositories-1168845079.html>

Kind regards,  
Theodora


author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

Atlassian shut down and eventually remove, older systems that are unpaid for, or have not been accessed for over six months (just logging in to read something should be enough to reset the counter).

They send plenty of warnings to the owners before initiating a shut-down, and again before deletion.

I suspect you've gone way past any point of recovery.

comments: author: android_logicgrabber
body: I agree but I was not well and was not in the situation even to be on the computer.

So, as per your answer, I lost everything?


Tags: bitbucket-cloud

cloud
How to tag a repository or code in the master branch
Asked by Tara Pandey:

There is information for this topic at but it does not work.

[Repository tags \| Bitbucket Cloud \| Atlassian Support](https://support.atlassian.com/bitbucket-cloud/docs/repository-tags/)

None of it looks a real information. Has anybody used this information to tag the whole code in a branch?


Answers:
author: Patrik S
body: Hello [@Tara Pandey](/t5/user/viewprofilepage/user-id/5188280) ,

Thank you for reaching out to Atlassian Community!

Git tags are attached to commits, not branches. In order to tag a commit in the Bitbucket Cloud UI you can navigate to the repository in question, access the **Commits** page in the left panel and open the exact commit you want to tag. In the details on the right side of the page, click the **+** button as in the image below :

![Screenshot 2023-04-06 at 4.46.38 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/250374i0A62D462E23878D2/image-size/large?v=v2&px=999 "Screenshot 2023-04-06 at 4.46.38 PM.png")

You will then need to provide the tag name and an optional description.

Another option is to create the tag in your local clone of the repository and then push it back to Bitbucket. You can follow the below steps to use this approach :

1. Access the folder of your local clone of the repository

2. Checkout to the commit you want to tag

```
git checkout <commit hash>
```

3. Add the tag to the commit using the git tag command

```
git tag -a <tag_name> -m '<tag_message>'
```

4. Push the tag to Bitbucket Cloud

```
git push origin --tags
```

Hope that helps! Let me know in case you have any questions :)

Thank you, [@Tara Pandey](/t5/user/viewprofilepage/user-id/5188280) !  
Patrik S

comments: author: Tara Pandey
body: Thank you for your reply [@Patrik S](/t5/user/viewprofilepage/user-id/4603309).

I knew about the tagging the commit but if I would want to tag the whole source code NOT just the last commit for a Release (release point), can I achieve this but just tagging the last commit in that repository/branch?

I have almost 100 commits by different team members over the course of last 6 months and now I want to release the code, tag it for future refences and move on coding next features but would like to use the same branch for future code pushes.


author: Patrik S
body: Hello [@Tara Pandey](/t5/user/viewprofilepage/user-id/5188280) ,

When you tag a commit, you are not only including the changes introduced by that particular commit, but rather you are including all the changes before it as well. You can see a tag as the state of your source code at a given point in time.

So if you tag the latest commit of your repository, when doing check out or clone of that tag locally, it will include all the changes introduced by the previous commits as well.


Tags: bitbucket-cloud

cloud
Storing Github tokens in source tree
Asked by Rajat Khemka:

I want to store github token in sourcetree, because for every small commit on repository it requires me to enter token.

Can you please guide me steps to store github generated tokens inside sourcetree because it is really inconvenient to enter tokens again and again


Answers:
author: minnsey
body: Hi  

If you are using Sourcetree for Windows you should be prompted to enter the credentials via a GitHub branded GUI. This is the Git Credential Manager for Windows. It should prompt you and then when given good credentials store them and retrieve them anytime Git needs them.  

However there have recently been a few bugs in the Git Credential Manager for Windows which ships with Git for Windows.  

Quickest way to fix is to install Git for Windows 2.19.1 and then install Git Credential Manager 1.18.3 <https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/1.18.3> then set Sourcetree to use this install in the Tools/Options/Git tab System Git option,.
Login failure during Registration step of SourceTree for Mac installation
Asked by Phil Hadley:

I get "Login Failure" message using my Atlassian credentials that work on this portal. I found this documentation provided [here](https://confluence.atlassian.com/get-started-with-sourcetree/install-sourcetree-847359094.html) doesn't match the actual UI for the latest version, so I'm stuck.


Answers:
author: bgannin
body: Hi Phil,

What method are you using (Bitbucket Cloud or Bitbucket Server)? What other details or screenshots can you provide for context?

Brian Ganninger  
Senior Mac Developer, Sourcetree

comments: author: Phil Hadley
body: Bitbucket Server. Here are screenshots. I tried both my Atlassian portal credentials and my employer's network credentials.

![Screenshot 2018-11-19 11.43.53.png](https://community.atlassian.com/t5/image/serverpage/image-id/38029i57FB9E842C6270EC/image-size/large?v=v2&px=999 "Screenshot 2018-11-19 11.43.53.png")![Screenshot 2018-11-19 11.46.16.png](https://community.atlassian.com/t5/image/serverpage/image-id/38030i5FB0B084FD5B53CB/image-size/large?v=v2&px=999 "Screenshot 2018-11-19 11.46.16.png")


Tags: mac
Versions
Asked by Inna Berezinsky:

Hey  
just wanted to know if Sourcetree 3.0.8 works with Beyond Compare 3.3.13 version

The merge isn't working for me  
Thanks


Answers:
author: Seth
body: Did you see this discussion? <https://community.atlassian.com/t5/Sourcetree-questions/How-do-I-use-Beyond-Compare-3-as-external-diff-tool-for/qaq-p/269734>


author: Seth
body: I don't have an answer, but it would help if you could describe in more detail what part of the process isn't working (BC doesn't launch, BC doesn't have the right stuff in it, the completed merge doesn't show up in SourceTree, etc).

comments: author: Inna Berezinsky
body: I choose beyond compare to use on diff tab,  
but when I try to merge nothing happened.

It doesn't open the software.


Tags: beyond-compare
Personalize Git Flow init
Asked by Gl0ubI Nours:

Hello,

When I try to initialise git flow on existant repository from Sourcetree, I can personalise branch names, but these names aren't seem not used by internal init command.

I've got this error (for example, we develop with branch \<\< dev \>\>) :
> git init -d
>
> Using default branch names.
>
> Fatal: Local branch 'develop' does not exist.
>
> Which branch should be used for bringing forth production releases?
>
> - dev
>
> - master
>
> Branch name for production releases: \[master\]
>
> Which branch should be used for integration of the "next release"?
>
> - dev
>
> Branch name for "next release" development: \[develop\]
>
> Completed with errors, see above

I've try to init git flow from terminal, but I don't have \<\< git-flow \>\> commands or access to \<\< flow \>\> command with git :
> Gl0ubI:\~$ git-flow  
> -bash: git-flow: command not found  
> Gl0ubI:\~$ git flow  
> git: 'flow' is not a git command. See 'git --help'.  
> Gl0ubI:\~$

Any idea ?

Gl0ubI

MacOs 10.12.6

Sourcetree 2.7.6 (git embedded 2.17.1 / git-flow embedded)


Answers:
author: bgannin
body: Hi,

We're looking into reproducing this and will include a fix in a future update. Thank you for the report.

Brian Ganninger  
Senior Mac Developer, Sourcetree

comments: author: Gl0ubI Nours
body: Ok, thanks !


author: ???????? ?????????
body: "will include a fix in a future update"   
In version 3.2 (224) this has not yet been fixed. ?  


author: ????????? ??????
body: Version 4.0.1 (234) and still not fixed.


author: jquentin
body: Bug still there. Such a professional team.


Tags: mac
Sourcetree commit button does nothing.
Asked by olaeld:

I'm running version 3.0.8 for Windows, and when I press Commit button, the "Checking submodules" dialog shows for half a second, and then nothing. No error message, and nothing has been commited. I can commit using the command line, however.

I previously "solved" this problem by uninstalling, deleting the userdata, and reinstalling (a simple reinstall was not sufficient).

But this is getting tedious. How can I get to the bottom of this?

Update: The log file says:

ERROR \[2018-11-19 12:17:28,440\] \[49\] \[SourceTree.ViewModel.RepoDialogContainer\] \[Log\] - The calling thread must be STA, because many UI components require this.

System.InvalidOperationException: The calling thread must be STA, because many UI components require this.

at System.Windows.Input.InputManager..ctor() at System.Windows.Input.InputManager.GetCurrentInputManagerImpl() at System.Windows.Input.KeyboardNavigation..ctor() at System.Windows.FrameworkElement.FrameworkServices..ctor() at System.Windows.FrameworkElement.EnsureFrameworkServices() at System.Windows.FrameworkElement..ctor() at System.Windows.Controls.Control..ctor() at SourceTree.View.Controls.DialogFileListControl..ctor(IEnumerable\`1 items) at SourceTree.ViewModel.CommitAndFileStatusViewModel.CreateDisabledStagingViewCommitProcess(CommitOptions commitOptions, String useAuthor) at SourceTree.ViewModel.CommitAndFileStatusViewModel._FinaliseCommit() at SourceTree.ViewModel.CommitAndFileStatusViewModel.SubmoduleDialogCompleted(AbstractDialogViewModel repoDlg, Int32 returnCode) at SourceTree.ViewModel.AbstractDialogViewModel.Finish(Int32 returnCode) at SourceTree.ViewModel.SubmoduleCheckDialogViewModel.\<RefreshSubmodules\>d__46.MoveNext()


Answers:
author: minnsey
body: Hi  

I'm afraid I don't have an immediate solution, but can I ask for a little more detail, are you using Git or Mercurial and do you have submodules/subrepos ?

comments: author: olaeld
body: Hi

Using Git, and yes - there are submodules.


author: minnsey
body: Hi   

I've added it as a bug on our backlog <https://jira.atlassian.com/browse/SRCTREEWIN-11001>.  

Could you add any more details there? e.g. does it matter if the submodule as pending changes or not etc.  

thanks
sourcetree?OAuth????bitbucket??????????
Asked by tsubura.ishigaki:

sourcetree?OAuth????bitbucket?????????????????????????  
??????OAuth  
??????SSH  
???????HTTPS????????????  
???????SSH?????

? ??????????????  
2018-11-14 10:00 (JST) ????

? ??

* ????????: sourcetree v.2.7.4
* macOS v.10.12.6

? ????  
1. ???? \> ????? \> ?? ???  
2. ??????OAuth / ??????SSH ??????\[???????\]?????????  
3. ATLASSIAN??????????????????????????????????  
4. ??????????????????????????(!)???redirect_uri????????????  
![????????? 2018-11-16 12.34.07.png](/t5/image/serverpage/image-id/37933i40A540C716D4533E/image-size/large?v=v2&px=999 "????????? 2018-11-16 12.34.07.png")

? ??????????????????????  
sourcetree?????????????????????????????????????????????????????????????????

??????????????????????????????????????????????

<https://getsupport.atlassian.com/servicedesk/customer/portal/6/JPNS-22905>

?????????????????????????????????????????????


Answers:
author: Ai Hirama
body: ?????????????????????????

??????????????Sourcetree 2.7.4????????????????????????????

????????????3.0.0??????????????????????3.0.0?????????????????????

??????????????????????????????????????????????????????????????????????????  
[https://ja.confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html](https://ja.confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html "https://ja.confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html")


author: Ai Hirama
body: ??????????????????????????????

???????????????????????????????????????

??????????????????????????


author: tsubura.ishigaki
body: Ai Hirama ?

????????????

????????????????????

??????????????????????????????????

OS??????????SourceTreev3.0????????

??????????????????????????????????????

???????????????????


Tags: install

language-ja
SourceTree hidden
Asked by esekintela:

Hi

My SourceTree is minimized in the task bar but when I click the icon nothing happens until I close it and restart it again

Any idea please?

regards


Answers:
author: Rob Atkinson
body: me too


author: bgannin
body: Hi Roberto,

We've fixed this for the current update (3.0.9) that's rolling out to users this week. Our apologies for the hiccup.

Brian Ganninger  
Senior Mac Developer, Sourcetree

comments: author: esekintela
body: Ok Thanks


author: Howard_Hart
body: Curious about this - as of today, the latest version I can get (Windows platform) is 3.0.8.2279. I still have this issue....
Cannot login to my account to view Remote Repositories
Asked by pentool:

When I go to SourceTree, my remote repositories don't show. When I refresh my remote repositories from SourceTree's Repositories Browser, I get a dialog saying "Refreshing Remote Repositories failed", and provides me a "Sign In" button.

After I sign in (correctly) to my account the sign-in page/window is blank and nothing happens. No spinning cursor, nothing. Just a blank window. (The attached screenshot is displayed AFTER I signed in to my account.)

This happens all the time I try to view my remote repositories.

SourceTree 2.7.6

OS X 10.11.6

![Screen Shot 2018-11-18 at 2.51.36 PM.png](/t5/image/serverpage/image-id/37913iF97DC55BA0D0FB10/image-dimensions/386x500?v=v2 "Screen Shot 2018-11-18 at 2.51.36 PM.png")


Answers:
author: pentool
body: I was trying to login using SSH, but SourceTree did not found my SSH key. My keys are stored in a folder other than in the system's .ssh folder, so I had to manually copy the keys to the \~/.ssh folder.


author: pentool
body: Somehow I managed to receive this message when I tried to login for the 24t time.

![Screen Shot 2018-11-18 at 3.16.34 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/37914iB6FE03D68B3B61B5/image-dimensions/604x542?v=v2 "Screen Shot 2018-11-18 at 3.16.34 PM.png")
SourceTree Log selected does not have custom actions
Asked by pantonis:

When I click on log selected and Open selected version the file opens up in the default windows app.

This is a huge problem since when I am working on html files it opens up in browser instead of my editor.

There is not any selection to set custom actions in Log selected.

That missing feature makes sourcetree completely useless for viewing a file history


Answers:
author: bgannin
body: Hi Antonis,

Please file a ticket in our [public bug tracker](http://jira.atlassian.com/browse/SRCTREEWIN/) for triage.

Thanks,

Brian Ganninger  
Senior Mac Developer, Sourcetree
Bitbuscket??Sourcetree??????????????
Asked by ReikaHigashimoto:

Bitbuscket??Sourcetree?????????????????

???????????????????????

???????????????????????????????  

???????????  
![20181115-183941.png](/t5/image/serverpage/image-id/37761i6FD32191D2F69385/image-size/large?v=v2&px=999 "20181115-183941.png")![20181115-184219.png](/t5/image/serverpage/image-id/37762iD4141AFE929B3B93/image-size/large?v=v2&px=999 "20181115-184219.png")?????????????????????????????????


Answers:
author: Ai Hirama
body: ?????????????????????????

??????????????????????????Sourcetree?????????????????????????????????????????????????????????????????

????????????????


Tags: bitbucket

language-ja