youngmon/atlassian-qna huggingface dataset:
Azure Key Vault to store secrets - bitbucket pipelines
Asked by Susana Abrantes:

In our project we need to store secrets in Azure Key Vault and use them in bitbucket pipelines. Is it possible to do it?

I can not find anything about that.

Thanks for helping.


Answers:
author: Patrik S
body: Hello [@Susana Abrantes](/t5/user/viewprofilepage/user-id/5174760) ,

Welcome to the Community!

Once your credentials are stored in the Azure Key Vault, you can fetch them in your bitbucket pipeline by using the [Azure CLI run pipe](https://bitbucket.org/product/features/pipelines/integrations?search=azure&p=atlassian/azure-cli-run). This is a pipe developed by Microsoft that enables you to run the commands available in the Azure CLI in your Azure instance.

Since the Azure CLI provides the functionality to [Retrieve a secret from the Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-cli#retrieve-a-secret-from-key-vault) , you can leverage that in your pipeline build.

The example below illustrates how to configure a step to use the Azure CLI run pipe to fetch a secret from your Key Vault :

```
script:
  - echo "Using Azure-cli-run pipe"
  - pipe: microsoft/azure-cli-run:1.1.0
    variables:
      AZURE_APP_ID: $AZURE_APP_ID
      AZURE_PASSWORD: $AZURE_PASSWORD
      AZURE_TENANT_ID: $AZURE_TENANT_ID
      CLI_COMMAND: 'az keyvault secret show --name "ExamplePassword" --vault-name "<your-unique-keyvault-name>" --query "value"'
```

Please note that the variables need to be configured with the corresponding values of your Azure instance. For more details on what each of the pipe variables means, you can refer to the pipe's official documentation: [Azure CLI run pipe](https://bitbucket.org/product/features/pipelines/integrations?search=azure&p=atlassian/azure-cli-run).

Thank you, [@Susana Abrantes](/t5/user/viewprofilepage/user-id/5174760) !

Patrik S

comments: author: Andrii
body: Hi [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)

Thanks for your response. I've tried your script example, and it works perfectly fine. However, the "az keyvault secret show" command prints the value into the pipeline log.

I couldn't find a way to retrieve this value and store it in an environment variable for further usage. Something like this:

```
script:
  - echo "Using Azure-cli-run pipe"
  - pipe: microsoft/azure-cli-run:1.1.0
    variables:
      AZURE_APP_ID: $AZURE_APP_ID
      AZURE_PASSWORD: $AZURE_PASSWORD
      AZURE_TENANT_ID: $AZURE_TENANT_ID
      CLI_COMMAND: 'az keyvault secret show --name "ExamplePassword" --vault-name "<your-unique-keyvault-name>" --query "value"'
  - export KV_SECRET=<secret goes here instead of the pipeline log>
```

Thanks for helping.


Tags: bitbucket-cloud

cloud
How to enable launch external merge tool
Asked by Bhavin Sanghvi:

I am trying to use the Launch External Merge Tool through Source Tree but its disabled.

Can you please let me know how to enable that option.


Answers:
author: john carter
body: Hii, if your external merge tool is not working or error in enabling try "External Diff". I choose DiffMerge as the external tool to view and merge during the merge of separate branches. Thank you. If you are a Lenovo user and wanted to solve the query and problem with your laptop, desktop, printer, mobiles etc go to the [Lenovo Support](https://www.lenovosupportphonenumber.com/) for the solution. Here you can instantly help and solution about Lenovo products.
FATAL ERROR: Server unexpectedly closed network connection
Asked by Wooglab37:

Hi,

I'm trying to push some changes to bitbucket but getting this error constantly:

Git LFS: (0 of 38 files, 8 skipped) 0 B / 2.14 MB, 12.36 MB skipped  
FATAL ERROR: Server unexpectedly closed network connection  
fatal: sha1 file '\<stdout\>' write error: Broken pipe  
fatal: The remote end hung up unexpectedly  
fatal: The remote end hung up unexpectedly

I'm using SSH and my PrivateKey is loaded in Pageant, not sure where can be problem.

Thanks


Answers:
author: Nic Brough -Adaptavist-
body: This suggests that there's something wrong with the server you are trying to connect to, or the network you are connecting over.

You'll need to read the logs on the server side, probably the system ones to see if the connection was severed or the service stopped.

comments: author: Wooglab37
body: Is it possible that it's related to size of LFS files? I didn't get any problem to push single file (gitattribute), but when I tried to push several LFS files (one of them close to 10mb's) it gave me this.

EDIT: Ok I checked there is no limitation to LFS file for bitbucket. Will follow your advice thanks.


Tags: git-lfs
SourceTree Install
Asked by glerler01:

What is with installing Sourctree in Win10? I installed it. Used it. Then it was just gone. Didn't show up in in programs anywhere. Started the installer again to reinstall. It didn't install just opened up as if it was already installed. Huhhhh!!!?? If I close it .. it is no where to be found. Cant uninstall


Answers:
author: minnsey
body: Hi  

The installer should copy all of the files into %localapdata%/Sourcetree. It should also create a start menu item pointing at %localappdata%/Atlassian/Sourcetree.exe  

Can you confirm the installed files are there?

comments: author: glerler01
body: Thanks for the reply.

1. Start menu item was not there

2. Files where under localappdata.

3. Source tree did not appear under apps and features

I deleted the files under localappdata and SourceTree did now reinstall. I have been using it.

On another note I now will get 100+ instances of git running in the background. I reported it as a bug.


Tags: windows

install
pull/push takes forever
Asked by Jaekoo Kang:

Hi.

I just downloaded and installed sourcetree (version 2.7.6 177) on my macOS (version 10.13.6). I've been using only git command line tools on Terminal and wanted to use sourcetree this time.

However, I found that pull/push takes forever and stops. Below is a screenshot of one of the examples.

![Screen Shot 2018-10-13 at 11.29.16 PM.png](/t5/image/serverpage/image-id/34870i372D878EE20915C2/image-dimensions/575x324?v=v2 "Screen Shot 2018-10-13 at 11.29.16 PM.png")

Since the error message is not even shown, I typed the above command on Terminal. It threw me an error as below.

git: 'credential-sourcetree' is not a git command. See 'git --help'.

I tried to find any relevant queries regarding this error, but couldn't find one except for some similar cases.

Would you tell me what to try at this point? Please let me know if I miss anything. Thank you.


Answers:
author: Ana Retamal
body: Hi Jaekoo!

Are you still experiencing this issue?

Have you tried pulling on the terminal? Do you get any error? It if fails, then this is likely to be an issue with your credentials or the remote repo, otherwise it's an issue with Sourcetree. In that case we'll need more info:

1. Does this error happen with all your repositories, or only for specific ones?
2. What's the size of the repo?
3. Does it ever complete the operation? If so, how long does it take (approx)?

If the error happens in your terminal too, I'd suggest to turn to Github for more assistance as the repo is hosted with them.

Let us know!

Ana

comments: author: Jaekoo Kang
body: Dear Ana,

Thanks for your reply. I'm not sure what exactly happened, but it's been working totally fine since the day after I had this issue. I did reboot my mac and it works fine since then. I don't see any issues for all of my repositories. Pushing/pulling on Terminal also works as usual.

Jaekoo


author: Ana Retamal
body: Hi Jaekoo, well that's great that it started working :) If you have any other issues or need more help in the future, please let us know!

Have a great day,

Ana


author: kuno vaik
body: Its not working for me.

push and pull does not work, in terminal is everything fine, but when i hit push or pull button then it loads forever and nothing happens


Tags: mac
Wrong keyboard focus
Asked by Tristan Slater:

I like to stick mostly to keyboard. When I use the keyboard shortcut Cmd + 2 to switch to commit history, focus is not set to the list of commits. Tabbing doesn't seem to get me there either. I have to manually click into the commit list to navigate it with the arrow keys. Is there some way to fix this?

Thank you,  
Tristan


Answers:
author: minnsey
body: Hi   

It sounds like a missing feature, could you raise it at <https://jira.atlassian.com>, thanks.
How do I add a Related Work Item to a Commit?
Asked by Yadel Lopez:

Like in Visual Studio, I would like if possible to relate my commits to bugs, tasks, etc. In Visual Studio is as easy as Add Work Item by ID from the Related Work Items section.


Answers:
author: Daniel Eads
body: Hey Yadel,

I'm going to assume you're asking about Sourcetree, or at least about committing to a git repository like Bitbucket.

If you've got Bitbucket (or Github) connected to Jira, all you need to do is mention the Jira key (e.g. ABC-123) in your commit message and the rest will be taken care of for you by the Jira integration. It doesn't matter if you're using Sourcetree, Github Desktop, or even straight git-cli - as long as the issue key is in the commit message, it'll be linked.

To see more about connecting Jira to whichever source control you're using, check out these links:

* [Connecting Jira **Cloud** to Bitbucket](https://confluence.atlassian.com/bitbucket/connect-bitbucket-cloud-to-jira-software-cloud-814190686.html)
* [Connecting Jira **Cloud** to Github](https://confluence.atlassian.com/adminjiracloud/connect-jira-cloud-to-github-814188429.html)
* [Connecting Jira **Server** to Bitbucket or Github](https://confluence.atlassian.com/adminjiraserver/linking-a-bitbucket-or-github-repository-with-jira-938846899.html)

Cheers,  
Daniel

comments: author: Yadel Lopez
body: You guessed right about SourceTree, and I'm committing to a Git repo in VSTS. One thing I have noticed is, when I do it in VS the comments for the commit display the work item Id with a #\[Id\]. I'm not sure if by doing so (manually entering #\[Id\]), will be enough.


author: Yadel Lopez
body: It worked. By just adding #\[Id\] in the commit comments.


author: ?a?lar
body: How about for Azure DevOps? I tried it as #\[id\] and it didn't work. Any ideas?


author: David Gaidano
body: I have the same issue, any solution ?


Tags: bug

jira

task

visual-studio
How do I add new files(placed in some other windows folder) to the repository ?
Asked by Deepak:

Hello,

I created a git repository and added all my source code files to the project. I am using Sourcetree for Windows. Lets say the source code folder as X

Now there is a new design file foo.xml that resides in another windows folder (Lets say Y). This is not a source code file but another design file that needs to be in Y folder for logically organizing all project artifacts.

I need to add the foo.xml file to the version control, I want it to be a part of the existing project repository.

All help, suggestions, guide is welcome.


Answers:
author: minnsey
body: Hi  

You can do it .... but I wouldn't :)   

See [https://stackoverflow.com/a/8626989](https://stackoverflow.com/a/8626989?) for an example of how you can tell Git to manage an *external* folder, but it makes life very complex when cloning, ignoring etc.  

Other than that you *can* symlink ?   

<br />

*If* I really had to try and do something like this I might be tempted to put all the constituent parts in to standalone repositories and then have a parent Git repo which includes all of the others as submodules?


Tags: developer

git

windows
How to connect to GitLab CE
Asked by Arief Setiyo Nugroho:

Hi,  
i can't connect to my gitlab CE with sourcetree,  
how to configure it??

Thanks before,

![\[SourceTree\] - Can't Connect.png](/t5/image/serverpage/image-id/34807iC08AF99F32D63728/image-size/large?v=v2&px=999 "[SourceTree] - Can't Connect.png")


Answers:
author: Manju
body: You will need to generate a personal access token on your gitlab server and use that here. You can click on the link in "How do I create a personal access token?" and follow the instructions.

comments: author: Arief Setiyo Nugroho
body: ok, I allready have personal access token, now how to use it on sourcetree?


author: Mike Corsaro
body: Just click the "Refresh personal access token" and you should be able to enter your username, and the token as the password.


author: Arief Setiyo Nugroho
body: Oh OK, it works. Thanks all. :)


author: Cesar Hernandez
body: I have been turning crazy, and finnally do it. So, I will try to explain it in details.

1. At GitLab create a personal token.

2. At SourceTree, Add a new account, then, select GitLab, and Preferred Protocol SHH.

3. Click Refresh Personal Access Token, and enter the username and in the field of the pasword enter the token that we generated at GitLab.

This was the trick.

Thanks to all for helping.

comments: author: saber13812002
body: worked for me thanks a lot. but why didnt work by my password ,i know my password is correct. but this token worked.


author: Manju
body: If I'm not wrong, gitlab doesn't allow REST operations over basic auth password. You will need the Private token for this to work.


author: AntonyRusST
body: ??. ??????? ???????!

? ???? ????? ?????????? (??????? ?????, ?????????? ???, ??????? ? SourceTree ???????????? ? ??? ? ?????? ????????????? ?????)


author: John McKiernan
body: Hi all,

Just wanted to update this thread to let you know there is now a native automation trigger for GitLab with Jira Cloud. We are running a webinar soon to walk through how it works and show some use cases in how to automate from Gitlab to Jira. Feel free to register here: <https://www.atlassian.com/webinars/software/automate-across-gitlab-and-jira>

Cheers!
How I can show bookmarks in two or more lines?
Asked by Alex V:

Hello. This screenshot showing bookmarks in one line. ![Bookmarks.PNG](/t5/image/serverpage/image-id/34783iBCD612B6978F6809/image-size/large?v=v2&px=999 "Bookmarks.PNG")

But I want to see in two lines, because I need is long to scrolling to necessary bookmark.


Answers:
author: minnsey
body: Hi  

I'm afraid you can't currently do that, you can raise a feature request here <https://jira.atlassian.com>
Sourcetree commit hash as ID
Asked by peter_ho_sandc:

Hello,

I would like to be able to use the Sourcetree commit hash in my automated fpga build as a unique identifier to ID the automated build. I've been tasked to use the 40 nibble (hex char) value of the commit hash to do this.

I'm a novice Sourcetree user and would like to do the following:

1) In the repo directory structure find the file that contains the commit hash code.

2) copy that hash code into another text file where I have defined a parameter. This .vh file is also a file in the repo.

3) In place of the existing file, hash_var.vh, I would like my build script to use this new file and then run the build.

Can you help


Answers:
author: Mikael Sandberg
body: Welcome to the Atlassian Community.

The commit hash is generated by Git, not Sourcetree, and is used to identify your commits. You could try and figure out the hash by looking at the blob object, but you can easily get the commit hash by using the git log command. Take a look at [The anatomy of a git commit](https://blog.thoughtram.io/git/2014/11/18/the-anatomy-of-a-git-commit.html) and [Git Basics - Viewing the Commit History](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History) to learn more about the commit hash and how to get it.
SourceTree wierds out
Asked by Mike Jablonski:

Source tree could no longer connect to my GitHub repository. It said the repository does not exists (it does) and then I got many, many, many dialog boxes from GitHub asking for my username/password. It was like playing a game of whack-a-mole. (I can log into GitHub without problem.)

So I uninstalled source tree, and reinstalled it. The same problem can back. But during the uninstall, and the subsequent re-install there was no feedback. None. Zip. Zero.

Further analysis on my part shows that SourceTree did not really uninstall. It left pieces all over the place on my PC.

How can I fully unsinstall SourceTree so I can start over again? SourceTree simply no longer works properly. The Uninstall and reinstall results just messed things up.


Answers:
author: Stephen Sifers
body: Hello Mike,

Welcome to the community!

The issue you are explaining can be very frustrating to deal with.

[@Ana Retamal](/t5/user/viewprofilepage/user-id/1067288) published an excellent uninstall guide for SourceTree, here is it:

1. [Wipe SourceTree preferences](https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html).
2. Uninstall SourceTree (if it shows on the App\&Features list)
3. Backup then delete the directory below before proceeding with next step
   * Navigate to C:\\Users\\\<UserName\>\\AppData\\Local and delete *SourceTree* \& *SourceTree-Settings* folder
   * Navigate to C:\\Users\\\<UserName\>\\AppData\\Local\\Atlassian and delete all SourceTree Files/Folder.
4. [Download SourceTree](https://www.sourcetreeapp.com/) and install it.

Please let us know if this works for you.

-Stephen Sifers
Am I the only one with the dreaded all-files commit list?
Asked by ensemblebd:

It seems like I'm having to reload SourceTree AT LEAST 5 times a day, which as you know is a multi-step process (close, wait, open, wait, pageant login, switch tab, recover where you left off mentally).

Every now and then, sourcetree decides to list every f\*\*king file in the entire repo inside every historical commit made. So no matter which commit you pick in the list, it shows an ungodly list of files that have nothing to do with the commit.

So you can't review the commit at all. You have to restart the app.

JUST CURIOUS. Am i the only pissed off person? Or am I simply the only person period?


Answers:
author: minnsey
body: Hi  

Would you be able to add some screenshots to help us narrow down what you are seeing?  

Is this in the log view? If so is the behaviour you are seeing the equivalent of selecting all the rows in the log view and therefore having all files listed and diffed in the commit details pane?  

I'll be honest I've not seen this before but we can try and investigate
Can not Login to GIT sever
Asked by Ketan Shah:

I have smartGIT evaulation version and sourcetree. I am able to connect with smartGIT but I am not able to connect with SourceTree. I am getting following error

Command: perl.exe C:\\Users\\ketan.shah\\AppData\\Local\\SourceTree\\app-2.6.10\\tools\\svn.pl info ssh://ketan.shah@git.zh.coresolutions.com:29418//CBX_LDL  
Output:  
Error: System.ComponentModel.Win32Exception: The system cannot find the file specified  

Command: hg identify extensions.hgext.hgsubversion=! ssh://ketan.shah@git.zh.coresolutions.com:29418//CBX_LDL  
Output: remote: Gerrit Code Review: hg: not found  

Error: abort: no suitable response from remote hg!  

Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/KETAN\~1.SHA/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE" ls-remote ssh://ketan.shah@git.zh.coresolutions.com:29418//CBX_LDL  
Output:  
Error: Load key "/c/Users/ketan.shah/.ssh/id_rsa": invalid format  
ketan.shah@git.zh.coresolutions.com: Permission denied (publickey).  
fatal: Could not read from remote repository.  

Please make sure you have the correct access rights  
and the repository exists.

I have checked all keys. It is same key I am using for smartGIt but still there is issue


Answers:
author: minnsey
body: Hi   

Are you using Pageant/PuTTY or openSSH for you key management?


Tags: mercurial

windows
Query for SourceTree
Asked by Ayush Pratik Sonker:

A question about SourceTree...

"Could you tell me "the type, size and filenames of attachments uploaded to the Services"; does this mean that there is the ability to upload our data to the cloud with this application?"

Thanks and regards,

Ayush Pratik Sonker


Answers:
author: Stephen Sifers
body: Hello Ayush,

SourceTree will accept most file types and filenames. Size of file will be limited based on where the Git repo is located. If you are using Git locally, you will be restricted to the amount of disk space you have available. If you are using BitBucket cloud then you will be restricted to the plan you have selected and the available storage amount. More info on BitBucket cloud plans: h[ttps://bitbucket.org/product/pricing](https://bitbucket.org/product/pricing)

SourceTree will work well with Git Repos. You will need a Git repo to send said files to. With that said you can upload data from your local machine using SourceTree to a Git Repo (BitBucket, GitHub, tc.).

However, you wont be able to use SourceTree as an FTP client or Windows File Explorer client.

Additional material I would suggest reading through to further understand all capabilities of SourceTree:

<https://confluence.atlassian.com/get-started-with-sourcetree>

<https://confluence.atlassian.com/get-started-with-sourcetree/install-and-set-up-sourcetree-847359043.html>

-Stephen Sifers
Minimize/Restore doesn't work properly
Asked by Alegni Herrera:

After updating to the latest version of Sourcetree (v3.0.6), whenever I minimize the window to the taskbar, it wont restore back anymore. I end up having to right-click Sourcetree on the taskbar and select the "Close window" option and then re-launch Sourcetree.

Is anyone experiencing the same issue?


Answers:
author: Peter Langer
body: Same on my site.

But : Task Manager is able to switch / bring to front the source tree window

comments: author: therightstuff
body: At least the switch to works, but it's still very frustrating


author: Cookie Chan
body: I encounter the same problem and I have to use the "switch to" from task manager to make it work. PITA.


author: Wendt Withers
body: From below: Go to Tools\>Option\>General\>Repository settings\> **Refresh when application is not in focus** -\> Enable it -\> \[OK\]


author: sidshetye
body: Anyone subscribed to this issue, here is a workaround from the thread Wendt linked to:

Go to Tools\>Option\>General\>Repository settings\> **Refresh when application is not in focus**-\> Enable it -\> \[OK\]

comments: author: Frank Schophuizen
body: Thanks! It works.


author: Artem Antipin
body: Thanks!!!


author: Wendt Withers
body: Bug Filed: <https://jira.atlassian.com/browse/SRCTREE-6204>


author: sidshetye
body: Same here.

Related note: Software quality of Atlassian's Sourcetree is really poor. Basic functionality is constantly broken. Last year we has sourcetree [constantly reinstalling at launch](https://community.atlassian.com/t5/Sourcetree-questions/Every-time-I-launch-sourctree-it-acts-like-it-s-re-installing/qaq-p/708749) and the code-diffs horizontal scroll bar being buggy. Now something as basic as minimize and restore? Code reviews? Quality engineers? Automated tests?

This quality makes me nervous as we trust Atlassian's software suite (bitbucket, jira, sourcetree etc etc) when building our own software products.

Please introspect and improve quality.

- Your customers


author: Antti Alho
body: Same here


author: Frederic Lacerte
body: Same Here


author: Alistair Colley
body: Yes, same.

It flashes and then disappears


author: Wendt Withers
body: This thread discusses a fix:

<https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-v3-0-6-minimize-and-maximize-problem/qaq-p/912942>


author: Wendt Withers
body: I'm submitting a bug report now.

However, I've found that it's only a problem if the SourceTree Window is maximized (or close to maximized - probably above some width x height threshold). If the window is smaller than that, things work fine.

I happen to be on a 1920 x 1080 screen and if I get wider than about 1800 pixels: bingo, I have a problem.


author: Mike Overmeijer
body: Same here; has anyone submitted a bug report for it?


author: Tom A. Vibeto
body: Yes.