youngmon/atlassian-qna huggingface dataset:
Bitbucket server works fine in Internet Explorer, but not in Sourcetree
Asked by lassegravesen:

I am having an issue with the Bitbucket Server application that is hosted internally. Specifically my issue is this:

1) When I visit Bitbucket Server through a browser, like Internet Explorer, it works fine and I have access to all repositories.

2) If I try to open a repository through SourceTree, it says Permission Denied for 99.9% of all the repositories on Bitbucket Server.

3) If I try to continue to use Internet Explorer after having tried step 2, 99.9% of the repositories are now hidden from me and I no longer have access to them. If I restart Internet Explorer it works fine again.

Can anyone help me getting SourceTree to interact properly with Bitbucket Server, as without it I cannot properly interact with the repositories other than in a very limited read-only fashion(specifically, I can just view the repos on IE, I can't download, clone or anything like that).


Answers:
author: minnsey
body: Hi   

When you say you try to open the repository in Sourcetree, do you have your Bitbucket Server account setup in Sourcetree and you are trying to clone from the list of remote repositories in Sourcetree's 'New' tab? Or are you trying to use the 'Open in Sourcetree' functionality from Bitbucket Server?  

Also are you using HTTPS or SSH urls for your repos?

comments: author: lassegravesen
body: Hi Michael,

I have my Bitbucket Server account setup in SourceTree, and as soon as I do that, I get a significantly shorter list than the one in IE, and then curiously enough if I try reloading IE the amount of projects I can see through there has gone down from hundreds to \~10. It's as if once I've connected to the server using my credentials in SourceTree it flips a switch and kills my access. I can restore the access by restarting Internet Explorer.

I can also clone repositories just fine using the 'git clone' command but only if I use the ssh keys, it breaks if I try to use my login credentials. Similarly, if I try to use the API it breaks when I for instance run "curl -u username:password url".

It also breaks if I try using the "Clone in SourceTree" functionality.

SSH urls.

EDIT: I wonder if it has to do with the fact that my org has a login page that you have to go through to get access to internal sites, i.e. it might be getting stuck on the redirect or something? Even then it still works OK with SSH keys through the command line, and some repositories still show up. I don't really think this has anything to do with it, I think something else is going on.


author: minnsey
body: Thanks for the additional information. Sounds very strange. I will see if we can get any input from Bitbucket Server people.  

FWIW Sourcetree attempts to get the repos available to the user directly and also those available due to their membership of projects.


Tags: bitbucket-server

windows
Slack Notify pipe - Example of providing a simple text file as contents
Asked by Will Marsman:

<https://bitbucket.org/atlassian/slack-notify/src/master/>

Currently, we're using the slack notify pipe in order to add additional context. This pipe provides a way of providing a simple message, or a Block Kit style message.

However, what we typically want to do is provide a multi-line plain-text file as part of the message.

Unfortunately, this is somewhat of a tricky thing to do, as the naive approach with the \`MESSAGE\` parameter and \`PAYLOAD_FILES\` can be difficult.

Example 1: using the MESSAGE parameter

```
- pipe: atlassian/slack-notify:1.0.2
  variables:
    WEBHOOK_URL: $SLACK_WEBHOOK_URL
    PRETEXT: 'Releasing!'
    MESSAGE: >
      $(cat output.txt)
```

I believe this does not work as output.txt ends up breaking interpretation of the yaml file.

Example 2: using the PAYLOAD_FILES parameter

Using this parameter requires massaging this multi-line file in order to get it to show up, and can be quite confusing without dropping into a full programming language.

My request

It would be nice if the documentation provided an example which demonstrates how to provide a simple multi-line text file as either a MESSAGE parameter or a the PAYLOAD_FILES, or add a new parameter to support the common case of wanting to provide a text file as a message in slack.


Answers:
author: Igor Stoyanov
body: [@Will Marsman](/t5/user/viewprofilepage/user-id/4633041) hi. Thanks for your suggestion.

To cover your case check [this reference of how to attach file.](https://api.slack.com/reference/block-kit/blocks#file)

Regards, Igor


Tags: bitbucket-cloud

cloud

slack
Is it possible to see folder when searching repositories on main screen
Asked by enes-sahin:

I'm using Sourcetree 2.3.5.0 on Windows 10 x64.

Is it possible to see folder information when searching repositories on main screen (All Repos Folder).

I am working project based structure. Each project have project folder and projects have same repository names. When searching in Sourcetree All Repos Folder finds all repositories but it is not clear which repositories belongs to project or folder.


Answers:
author: minnsey
body: Hi  

It is not possible to see that information at the moment, but you can raise an enhancement request at <https://jira.atlassian.com/browse/SRCTREEWIN>
How do I see Internal Diff in Sourcetree?
Asked by Caleb Rader:

When I make changes to a file, sourcetree does NOT show the changes in Internal Diff.

I expect to see the changes in Internal Diff.

What changes do I need to make in Options to see my changes in Internal Diff?

![Untitled.png](/t5/image/serverpage/image-id/11767i57B5D2CF93E2AD4D/image-size/large?v=v2&px=999 "Untitled.png")


Answers:
author: minnsey
body: Hi  

Ultimately Sourcetree relies on the 'git diff' command for that information. Typically you will see an empty diff the file is binary or encoded as something other than ASCII.  

You can see what git thinks the diff is by opening the Terminal and running git diff against that file. See <https://git-scm.com/docs/git-diff>
How to correctly sign android build via bitbucket pipelines?
Asked by Oleksandr Sorochynskyi:

Hello.

I have the bitbucket pipeline for android builds, but can't sign my apk.

```
 - step:

    name: Build android

    image: android-30

    script:

      - echo $DEBUG_KEYSTORE_FILE_BASE64 | base64 -d > android-signing-keystore.jks

      - ./gradlew -SIGNING_JKS_FILE=android-signing-keystore.jks

                   -KEYSTORE_PASSWORD=$SIGNING_KEYSTORE_PASSWORD

                   -KEY_ALIAS=$SIGNING_KEY_ALIAS

                   -KEY_PASSWORD=$SIGNING_KEY_PASSWORD

                   :app:assembleTestReleas
```

In **build.gradle** I've added:  

```
 signingConfigs {

   release {

     storeFile file(SIGNING_JKS_FILE)

     storePassword KEYSTORE_PASSWORD

     keyAlias KEY_ALIAS

     keyPassword SKEY_PASSWORD

   }

 }
```

<br />

But got the error:

    Unknown command-line option '-K'.

How correctly sign android build via pipeline?


Answers:
author: Erez Maadani
body: Try replacing

```
- ./gradlew ...
```

with

```
- > ./gradlew ...
```

comments: author: Oleksandr Sorochynskyi
body: In this case I'm getting invalid pipelines file


author: Minh Tan
body: [@Oleksandr Sorochynskyi](/t5/user/viewprofilepage/user-id/5056684) do you resolve the issue ? and how did you do it?


author: Oleksandr Sorochynskyi
body: [@Minh Tan](/t5/user/viewprofilepage/user-id/5088945)Yes, I've solved.

Looks like:  

```
 - echo $DEBUG_KEYSTORE_FILE_BASE64 | base64 -d > app/android-signing-keystore.jks

 - ./gradlew -PKEYSTORE_FILE=android-signing-keystore.jks

   -PKEYSTORE_PASSWORD=$SIGNING_KEYSTORE_PASSWORD

   -PKEY_ALIAS=$SIGNING_KEY_ALIAS

   -PKEY_PASSWORD=$SIGNING_KEY_PASSWORD

   :app:assemble"$BITBUCKET_BRANCH"Release
```

<br />

And variables have names:  

**DEBUG_KEYSTORE_FILE_BASE64**   
**SIGNING_KEYSTORE_PASSWORD**   
**SIGNING_KEY_ALIAS**   
**SIGNING_KEY_PASSWORD**


author: Oleksandr Sorochynskyi
body: And in a file build.gradle I've added:  

```
 signingConfigs {

   release {

     if (project.hasProperty('KEYSTORE_FILE')) {

       storeFile file(KEYSTORE_FILE)

       storePassword KEYSTORE_PASSWORD

       keyAlias KEY_ALIAS

       keyPassword KEY_PASSWORD

     }

   }

 }
```


Tags: android

bitbucket-pipelines

cloud

gradle
Is there a way to view a list of versioned files of a Git project with SourceTree?
Asked by MinKu_Yeo:

Hi, I use SourceTree 2.3.5 and Git 2.15 on a 64-bit Windows 10 PC.

After reading [this link](https://superuser.com/questions/429693/git-list-all-files-currently-under-source-control), I usually check the versioned file with the Git ls-tree command.

**$ git ls-tree -r master --name-only**

Similarly, I was wondering whether giving a list of versioned files, from each branches (master, develop, etc) from SourceTree is possible or not.

Is this feature available from SourceTree Windows/MAC?

-Best Regards


Answers:
author: minnsey
body: Hi  

We don't explicitly support that command, but the closest option being to choose the 'All' option from File Status/Order drop down at the top of the File Status view.

comments: author: MinKu_Yeo
body: Thanks, Michael.

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

I mostly used the "Log/History" view, so I didn't notice this view. Thanks for your answer!

P.S.) Wish you a happy holiday season!


Tags: windows
Unable to push to remote repo
Asked by Hadrien Dykiel:

Hi, when I try to push my local repo to my remote bitbucket one I get the following error message:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/master:refs/heads/master

Pushing to git@bitbucket.org:hdykiel/career-exploration.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

Pushing to git@bitbucket.org:hdykiel/career-exploration.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

Pushing to git@bitbucket.org:hdykiel/career-exploration.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

Pushing to git@bitbucket.org:hdykiel/career-exploration.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

Completed with errors, see above

I created a SSH key but when I try to add the key to bitbucket I get the error message "Invalid access key". I'm using a MAC. Can you help?

Thank you!


Answers:
author: Manju
body: Can you please check if your key is loaded to ssh-agent? Use below command on terminal to check that

```
ssh-add -l
```

If no key is listed, please add it to the agent with below command,

```
ssh-add <path_to_key>
```

More like,

```
ssh-add ~/.ssh/id_rsa
```

If you have added the account in Sourcetree, you can go to accounts section in Preference window, click on edit key and copy the key associated with the account and login to bitbucket on browser and add the key there.
Need to insert new SSH keys each day
Asked by Nenad Jovanovski:

Something strange is going on with my Sourcetree. Each day I need to generate new ssh keys otherwise I get 'permission denied' error. I need to manually delete the old ones from the ssh folder on my mac because if I just copy the old one and try to insert it again in bitbucket I get 'key already exists' error so it's not the key that it doesn't match but it's something else.


Answers:
author: bgannin
body: What version of Sourcetree are you using?

What OS are you running?

What is the output of *ssh-add -l*(does it contain the identities you expect)?

comments: author: Nenad Jovanovski
body: * I am using the latest 2.6.3 version of Sourcetree
* Running macOS High Sierra 10.13.2
* That command returns: The agent has no identities.

I noticed that the problem happens once I close Sourcetree and then open it again. This is the error I get:

![Screen Shot 2017-12-28 at 22.10.04.png](https://community.atlassian.com/t5/image/serverpage/image-id/11659iD96CC644FCE09865/image-dimensions/395x217?v=v2 "Screen Shot 2017-12-28 at 22.10.04.png")

And then I check this:

![Screen Shot 2017-12-28 at 22.11.02.png](https://community.atlassian.com/t5/image/serverpage/image-id/11660iA0858BA5700E19CE/image-dimensions/394x264?v=v2 "Screen Shot 2017-12-28 at 22.11.02.png")

I click copy to clipboard and then go to integrations\> ssh in bitbucket and after I try to insert the key I get this:

![Screen Shot 2017-12-28 at 22.11.51.png](https://community.atlassian.com/t5/image/serverpage/image-id/11661iB4C422A5C579D2FE/image-dimensions/396x287?v=v2 "Screen Shot 2017-12-28 at 22.11.51.png")

So if I try to enter the key again I get that message so everything is ok with my key, nothing is modifying it.

To be able to fix this I need to manually remove the key from my ssh folder, generate new one and then add it to bitbucket. After that it works, until I close Sourcetree, and then again.


author: Nenad Jovanovski
body: Actually nevermind I found the problem here: <https://apple.stackexchange.com/questions/254468/macos-sierra-doesn-t-seem-to-remember-ssh-keys-between-reboots>

The problem seems to be with my OS.


Tags: bitbucket
Still unable to delete REST Saved Passwords in Tools/Options/Authentication?
Asked by Justin Stephens:

This was a known bug in June 2017, when will it be corrected?

I am using version 2.3.5.0 of Sourcetree.

Thanks,


Answers:
author: Justin Stephens
body: I found the answer in another post "Where saved password is located?".

The solution is to go to Windows Control Panel \> System and Security \> User Accounts \> Credential Manager \> Manage Windows Credentials to remove the unwanted Passwords and Accounts.

comments: author: saran
body: Thanks, i was not able to remove rest password for long time and this resolved my problem.


author: Eric
body: Thank you so much, was searching this solution for some time.


Tags: delete

password
Windows 10, Sourcetree 2.3.5, does not start
Asked by Vladimir Shchur:

I have the same problem as described here  
<https://community.atlassian.com/t5/Sourcetree-questions/Windows-10-sourcetree-2-3-5-does-not-start/qaq-p/661948>  
The difference is that my sourcetree.log is empty. The suggested solution for that question fails with

---------------------------  
RegSvr32  
---------------------------  
The module "PenIMC_v0400.dll" was loaded but the entry-point DllRegisterServer was not found.

Make sure that "PenIMC_v0400.dll" is a valid DLL or OCX file and then try again.  
---------------------------  
OK  
---------------------------  

Any help appreciated


Answers:
author: minnsey
body: Hi  

I suspect this might be to do with your .NET setup, see <https://support.microsoft.com/en-us/help/4011984/description-of-the-update-for-the-net-framework-4-6-and-4-6-1-on-windo>

comments: author: Vladimir Shchur
body: Unfortunately, this link is for windows 8, and I have windows 10 so the suggested updates can't be applied.


author: Chris Edmonds
body: I'm am also having the same issue on Windows 10 with version SourceTree 2.4.7
"No supported authentication methods available (server sent: publickey)"
Asked by John Fricker:

Software installed:

* SourceTree 2.3.5.0 - from the latest ST installer.
* (embedded) Git 2.14.1.windows.1 - the latest included with the latest ST installer.
* Pageant 2012-06-04:r9551 - from the latest MSI installer for putty/puttygen/plink/pageant.

<br />

Today started out fun. I've been using the old SourceTree client for over a year, with key authentication via pageant. Today my co-worker changed permissions settings on the bucket, and I found that I could no longer access a couple of repositories via SourceTree - it kept prompting me for a username and password. Through the git CLI, I was still able to perform all the usual tasks on the sasme repository using username/password authentication.

In an effort to fix this, I updated all software to the latest versions installed. No dice, it still wouldn't work. So I created a new key, and add it to pageant and bitbucket, deleting the old key from both. I only have one key.

Under "Edit hosting account" for my only BitBucket account, I have "preferred protocol: SSH", as per the instructions. I have the green tick and "Authentication OK".

Under repository settings, I have my origin path. In there, the URL is ssh://bitbucket.org/\~\~/\~\~, host type is bitbucket, username is my username - the one that works through the CLI.

Everything is looking good, right? Until I try to do anything, upon which I receive the error message above. If I try to use the git CLI, I'm told that it can't communicate with my authentication agent.

How do I resolve this?


Answers:
author: minnsey
body: Hi  

Is Pageant running, with your key leaded, in your system tray when this fails? It sounds like it isn't, but that might be too simplistic.

comments: author: John Fricker
body: It is running.


author: minnsey
body: Sorry another simplistic question are you using a key or username/password for the SSH connection? If it is a key is it loaded in Pagaent?


author: John Fricker
body: "I created a new key, and add it to pageant and bitbucket, deleting the old key from both. I only have one key."

[@minnsey](/t5/user/viewprofilepage/user-id/502201) Don't you think it's terrible customer service when you ask questions which are answered by copying and pasting from the original question?


author: minnsey
body: Sorry, simply a mistake on my behalf.  

Can you post up the error you get from the CLI? Thanks
What have I done wrong?
Asked by Grant Vergottini:

I've been using SourceTree for over a year with no major issues. Now I have a new laptop and I'm trying to setup the new version:

1) I setup a remote account on GitHub using basic authentication and my GitHub credentials. My GitHub repos all display.

2) When I select Clone on one of them it takes me to a Clone screen

- First off, it tells me that cloning is even easier if I would setup a remote account. ??? I have done that

- It shows an <https://github.com/MyCompany/MyRepo.git> path in the first box and says below it: Repository Type: ? This is not a valid source path /URL \[Details\] But, it put that path in that box. What is wrong with it?

- I click on \[Details\] and I get a dialog box with nothing in it other than a blue circle with an "i" in it and a cancel button.

- Next are two unlabeled entry boxes. I'm guessing that the first one is the path to the local repo and the second seems to be a repeat of the name of the folder. Why is there no label? No explanation. Nothing?  

- Then there is a Local Folder: drop down that says \[Root\] and offers no explanation.

- Next are advanced options and none are offered as the clone source has not been detected.

- Finally there is a disabled Clone button.

My question is: How can I go back to a working version of Sourcetree? This version is a mess.


Answers:
author: minnsey
body: Hi   

Can you add a screenshot of the problems?
Is there any way to discard *all* whitespace-only changes at one time?
Asked by Rob Lusardi:

I like having my editor trim trailing whitespace upon a save; it works great to keep a new file clean. But, it's a problem when I need to make a small change in a file that a junior engineer wrote as there may now be 20 lines "changed" rather than the one in question.

At times like this, I've been discarding the individual sections where the change is whitespace-only, but wondering if there's a way to discard all whitespace-only changes at one time.

I'm open to alternative suggestions as well.

Thanks.


Answers:
author: minnsey
body: Hi  

Its not something we support inside Sourcetree, but does this do what you want?  

<https://stackoverflow.com/a/23125843/1297975>

comments: author: Rob Lusardi
body: It's not perfect, but I definitely think it will work. Thanks!
Sourcetree 2.3.5.0 Install Fails on Windows 10
Asked by zzzAndre Pfanz:

I'm trying to install the latest version of Sourcetree on my computer that has Windows 10. When I get the the "Log in to your Atlassian account" dialog box, I click on the "Use an existing account" button and get a blank popup. I wait, but nothing ever happens. I tried clicking the "Go to My Atlassian" button and logging in using my Google login and get to the Licenses page on the <https://my.atlassian.com/> site, but don't know what I'm supposed to do to advance the install on my computer. If I click on the "Use an existing account" button, I always get an empty dialog popup. No errors or anything.

I tried the suggestion of setting the "Access data sources across domains" to enabled in IE but still get the same result. I tried running the install as an administrator too.

Does anyone have any ideas?


Answers:
author: Mikael Sandberg
body: Have a look at this thread, <https://community.atlassian.com/t5/Sourcetree-questions/Use-an-existing-account-window-is-blank/qaq-p/643924#M18786>

One workaround that seems to work is this one:

<https://stackoverflow.com/questions/36467893/sourcetree-installation-atlassian-login-stuck/46669458?noredirect=1#comment82510007_46669458>


Tags: install
How to create a patch for a single (or selected) file?
Asked by R T:

I cannot seem to find a way to create a patch (or diff) for a subset of files for a commit.

Environment:

* Sourcetree 2.6.3 (134) for Mac (OS X Sierra)
* Git repository on BitBucket

Scenario:

1. Large commit containing many changes
2. In History View, I right click on the most recent commit and select "Create Patch..."
3. Patch window appears. In the history pane of the patch window I select the version I want to generate the diff (patch) from
4. In the files window (lower left of the patch window) I select only the files for which I want to view
5. This works for VIEWING the diffs (it only shows the diffs for the selected files) but when I click "Create" to create the patch file, the patch shows ALL files that have changed

How do I create a patch (diff) file for only the selected files?


Answers:
author: Manju
body: I'm afraid there isn't an option to create patch per file or for individual files in commits. This is possible only if the changes are not committed.

Feel free to submit an enhancement request on jira.atlassian.com for the Sourcetree team to consider this feature in a future release.

Thanks,  
Manjunath  
Sourcetree Mac Developer

comments: author: Edoardo Molinatti
body: Hi Manju, how can it be done if the changes are not committed?  
Should the file(s) be staged first?


author: Ni Bu
body: As far as I know, this feature is still not implemented in the latest sourcetree version.

But, actually, what you want is possible when creating a patch file from your working copy changes. So there is a workaround by performing the following steps:

1. You checkout the commit that is one commit ahead of your desired commit
2. You Cherry Pick your changes from the desired commit (uncheck the check box "Commit immediately upon successful merge". No you have "load" the commit into your working copy.
3. You click on Actions-\>Create Patch...
4. You click on "Working Copy Changes"
5. You can now select all files that should be included into the patch file

Step 1 may not be needed in every case, but may be helpful to avoid a lot of merge conflicts and to make sure that all changes of the desired commit are included in the patch file.


Tags: mac