youngmon/atlassian-qna huggingface dataset:
How to run shell script on gcp linux server from bitbucket pipeline
Asked by Chirag Sharma:

How to run shell script on gcp linux server from bitbucket pipeline


Answers:
author: Mateus T
body: Hi [@Chirag Sharma](/t5/user/viewprofilepage/user-id/2835660),

Thank you for reaching out to the Atlassian Community!

In theory, this should be possible. All that would be needed is to set up an SSH tunnel between your build and the GCP Linux Servers.

In this case, I believe the best way to address this would be to reach out to the Google Support Team or check their documentation on how to properly add your private SSH key there, in order to allow for that connection.

Cheers,

Mateus T


Tags: bitbucket-cloud

cloud

google-cloud
Does Atlassian have any Static Code Analysis Tool integrated with Bitbucket
Asked by PRabhakar:

Does Atlassian have any Static Code Analysis Tool integrated with BItbucket to Scan the code which is been pushed in Bitbucket?

We are using Sonar Scan presently but we would like to is there any Plugin which starts the scan once after commit pushed server


Answers:
author: Aron Gombas _Midori_
body: In addition to the app suggested by [@Charlie Misonne](/t5/user/viewprofilepage/user-id/502263) in his answer, there is a very popular long-time-existing alternative: [https://marketplace.atlassian.com/apps/1212735/include-code-quality-for-bitbucket?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1212735/include-code-quality-for-bitbucket?hosting=server&tab=overview)

You may want to evaluate also this one.


author: Charlie Misonne
body: Those kind of solutions are usually integrated in builds: a git commit and push triggers a build in a CI/CD tools such as Bamboo, Jenkins, Azure Devops, ... and triggers a scan in Sonar.

The build then fails or succeeds depening on the scan.

If you're not using a CI/CD solution yet I would strongly recommend it.

[This plugin](https://marketplace.atlassian.com/apps/1220660/sonarqube-for-bitbucket-server?hosting=server&tab=overview) however seems to integrate Sonar directly in your pull requests. You can use a free trial to validate your requirements of this product before purchasing it.


Tags: bitbucket-server

server
BitBucket Encryption
Asked by Robert Lerner:

I read the post about BitBucket being encrypted <https://bitbucket.org/blog/bitbucket-cloud-is-encrypted-at-rest>.

Is this disk level encryption?


Answers:
author: Ben
body: Hi Robert,

Welcome to the Bitbucket Cloud Community!

I can confirm that yes, this refers to disk-level encryption.

This can be seen when viewing our roadmap:  
[https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket\&search=encryption](https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket&search=encryption)

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: angelo_anatrella
body: Hi Ben,

Is there a way to show that my bitbucket repository is actually encrypted ?

Thanks


author: Ben
body: Hi Angelo,

Outside of our blog post stating that encryption is present, what would be needed from our end?  
<https://bitbucket.org/blog/bitbucket-cloud-is-encrypted-at-rest>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
is there a way to release a terraform module that lives on a bibucket repo?
Asked by Ramiro Achaval Rovira:

I would like to create a tagged release for my terraform module using a pipeline step when this get merged to master using a Pull Request.

Something like this.

    release_job:  stage: release  image: registry.gitlab.com/gitlab-org/release-cli:latest  rules:    - if: $CI_COMMIT_TAG      when: never                                  # Do not run this job when a tag is created manually    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH  # Run this job when commits are pushed or merged to the default branch  script:    - echo "running release_job for $TAG"  release:                                         # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties    tag_name: 'v0.$CI_PIPELINE_IID'                # The version is incremented per pipeline.    description: 'v0.$CI_PIPELINE_IID'    ref: '$CI_COMMIT_SHA'    


Answers:
author: Mark C
body: Hi [@Ramiro Achaval Rovira](/t5/user/viewprofilepage/user-id/5001376),

Welcome to the community.

If I understand it correctly, you'd like Bitbucket Cloud Pipelines to trigger builds on tag release.  
If yes, you can try triggering Pipelines builds by triggering on tags.  
You can check this link for more information about triggering Pipelines tags. - [Configure bitbucket-pipelines.yml - tags](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#tags)

You can test it out and see if it fits your requirement.  
Let me know if you have further questions.

Regards,  
Mark C

comments: author: Ramiro Achaval Rovira
body: Hey Mark, thank you for you answer, let me try to explain better.  

I need to create a step what will alow me to create a release for whatever I have in my repository, and set Git tags to version it.


author: Mark C
body: Hi [@Ramiro Achaval Rovira](/t5/user/viewprofilepage/user-id/5001376),

In this case, you can achieve this by using branches and tags triggers.  
Here's an example of Pipelines YAML configuration:

```
pipelines:  tags:    'release-*': # This will trigger by pushing a tag with the name pattern release-*      - step:          name: Release by tag          script:            #- Do validation here for the variable $BITBUCKET_BRANCH and create a repository variable for the default branch (e.g. $DEFAULT_BRANCH) // You can use bash if else here then return exit 1 if it's not the same.            - echo "Some commands here to release"  branches:    default_branch: # This will trigger for the default branch      - step:          name: Release by branch          script:            - echo "Some commands here to release"
```

The above YAML configuration works when there's a new commit push to the **default_branch** branch and when there's a new tag push.  
For the tags trigger, you can do the validation first before proceeding to run your release commands.

Hope it helps and let me know if you have any further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Results when calling Bitbucket API https://api.bitbucket.org/2.0/repositories/{workspace}
Asked by ESCNV:

I noticed that even when a workspace has been set to private, I can call the <https://api.bitbucket.org/2.0/repositories/{workspace>} w/o credentials and still get a response instead of getting a 401 or similar.

```
{"values": [], "pagelen": 10, "size": 0, "page": 1}
```

I get the above response and the pagelen key seems to accurately count the number of projects within the workspace.

I get that there really is not much information in the response but it does seem to reveal a number that I feel should be private. Could I be missing a setting somewhere or is this expected behavior?


Answers:
author: Ben
body: G'day!

The pagelen value is by default 10, it is not actually showing the number of results pulled by the API query so rest assured that this information is not being revealed.  
This can be increased higher by adding the pagelen value to the URL, you can try this yourself by appending "?pagelen=20" to the end of the query URL, without authentication it will result in:

```
{"values": [], "pagelen": 20, "size": 0, "page": 1}
```

Hope this makes sense.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Is it possible for a pipeline to run only after a pull request has been approved and merged?
Asked by Adam Spain:

Right now, a pipeline runs as soon as a Pull Request is created. Meaning, it runs before the pull request has been approved or merged. This is not ideal - what if the pull request requires revisions?

Is there a way to specify in the \`bitbucket-pipelines.yml\` to only deploy upon a merged pull request, rather than as soon as the PR is created?

My current pipeline looks like this:

```
pipelines:
  pull-requests: # The branch pattern under pull requests defines the source branch.
    dev:
      - step:
          name: Deploy to Production
          deployment: Production
          script:
            - do stuff
            - deploy stuff
          services:
            - docker
```

For example, in github actions, you can do something like:

```
prod-push:
  if: github.event.action == 'closed' && github.event.pull_request.merged == true
```


Answers:
author: Brendon Parker
body: Sounds like you want the pipeline to run off of the merge to main, not on the pull request. Something like:

```
pipelines:
  branches:
    main:
      - step:
          name: Deploy to Production
          deployment: Production
          script:
            - do stuff
            - deploy stuff
          services:
            - docker
```


author: Che Fisher
body: You might want to look into building a custom Forge app using the newly minted Bitbucket events: <https://bitbucket.org/blog/upcoming-changes-to-pull-requests-and-merge-check-configuration>

The new \`on-merge\` event sounds like what you want here - once the PR is approved, hitting the merge button should trigger any on-merge checks. Technically this happens *before*the merge - if you really do want to hook into the merge event the existing branch trigger functionality should have you covered there.

Good luck!


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

pull-request
can i use sourcetree to manage .asp or .aspx files?
Asked by anthony_tan:

can i use sourcetree to manage .asp or .aspx files?

Thanks in advanced!


Answers:
author: Mike Corsaro
body: Hello! Yep, you can use SourceTree to manage pretty much any file. ASP and ASPX files are text, so they should work just fine.

comments: author: anthony_tan
body: Thanks Mike!
Is there a way to hide/park/stash UNstaged changes?
Asked by Matt Fleagle:

I'm a tech writer, not a programmer, and my understanding of source control is limited. We use SourceTree to work with our documentation projects in a GIT repo on a TFS server. It works well. Recently I have made a bunch of changes to a score or more of files in a documentation project, but this work is suddenly on hold indefinitely. They aren't harming anything, but I have to wade through these unstaged changes in order to find new changes I want to stage and commit. It gets old. I suppose maybe this is what branches are for, but we have not used branches and I wouldn't want to start now if it isn't absolutely necessary. I see that you can "stash" changes that have already been staged. What about unstaged changes? Does anyone have a recommendation on the best way to get these changes out of my (Working Copy) Unstaged Files pane? Or should I just live with them. Or learn to branch?

TIA

-Matt


Answers:
author: Mike Corsaro
body: Hello! You're on the right track: branching was directly designed to solve this problem (you can read our guide about branching [here](https://www.atlassian.com/git/tutorials/using-branches)). You can also stash those changes even if they're not staged by hitting the "Stash" button. Be aware that all changes on your working copy will be stashed if you do so.

comments: author: Matt Fleagle
body: Thanks Mike!
I stil can't log into my Atlassian account despite resetting my password numerous times
Asked by Susan Murphy:

I am resetting my password and am then entering my username (email address) and the new password. Still getting an error message saying invalid username/password. Am I being firewalled out? I have tried entering my username as just my name without the email address.


Answers:
author: Ana Retamal
body: Hi Susan! Username and email address are different things, some of our services will require a username while others will ask for your email address. Where are you trying to log in? Keep in mind that:

* Atlassian account (my.atlassian.com) requires email address
* Sourcetree requires username
* Bitbucket Cloud requires email address
* Bitbucket Server, it depends on your setup - if you're not using LDAP then you need your username

Let us know so we can continue helping you!

Best regards,

Ana
Sourcetree + firefox can't get clone button not fund
Asked by kriveraULS:

Dear, I need to fix this problem. I had installed SourceTree on my windows 10 from version 1.5, I was updating until the jump to version 2.0. The issue is that now update to version 2.1.2.5, the point is that I can not clone repositories from bitbucket, exactly from firefox and using the clone button. I have tried everything and nothing works, enable check for URI, uninstall and delete everything, reinstall and nothing. Also I do not see the application in program files, it only appears in appdata / local / sourcetree / 2.1.2.5 / sourcetree.exe. Can someone help me please


Answers:
author: Ana Retamal
body: Hi Ken, looks like you're affected by the bug [SRCTREEWIN-7496](https://jira.atlassian.com/browse/SRCTREEWIN-7496). Please watch that ticket to be notified of further updates, you can also add a comment if you have any questions.

Best regards!

Ana

comments: author: kriveraULS
body: The ticket you send me has no solution, I need a solution to the problem since I have done everything, install again, reinstall an old version and then the last one. I need a solution


author: Ana Retamal
body: Hi Ken, the ticket I sent you is the bug report where you can follow the updates until that issue is solved. If you have any questions or comments in the meantime, you can post them there.

Regards,

Ana
How do I update Sourcetree 2.x for windows?
Asked by IronHide8391:

I have a sourcetree 1.9.10 and would like to update to the latest one 2.x.x but I am worried that if i do I will have to set everything up, all my repoos and branches, credentials. Is this the case ? or will I just get the new features and UI and everything will just magically work ?


Answers:
author: Ana Retamal
body: Hi Karol! You'll get the new features and everything will keep working as before. As you're changing from 1.x to 2.x you'll need to uninstall the previous version first, then download the newest version from [our website](https://www.sourcetreeapp.com/) and install it.

Let us know if you have any further questions!

Best regards,

Ana

comments: author: IronHide8391
body: Ok but will the new verison know where all my repositories and branches are (locally) and also all the credentials setup ? or will i have to tell it all that information ?


Tags: windows
Adding a github enterprise account to source tree
Asked by Anupam Nanda:

Are we able to connect to GitHub Enterprise using Source Tree? Or this is still unsupported?


Answers:
author: S Smith (James)
body: There have been many feature requests made for this feature. I have found some [as far back as 2012.](https://jira.atlassian.com/browse/SRCTREE-1182) They all get marked as duplicates and closed, with the staff saying they "plan on doing it but things got in the way", even though it would be remarkably easy to do.

One person even promised to raise its priority because of the high interest but looking at all of them today, they are still "resolved" or low priority. Another suggested that a duplicate issue raises the importance of the original. Ambiguous about whether that is programmatic or manual work done.  

Some users have done the research for them and found that the same API calls are used for both versions of GitHub with the only difference being the endpoint address and the lack of "Download as Zip" functionality from the API. See [here](https://jira.atlassian.com/browse/SRCTREE-1182?focusedCommentId=440704&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-440704)  

This is something many people search Google for, as indicated by the fact that it was the first suggestion when hitting spacebar after searching "sourcetree github".  

Atlassian doesn't feel pressure to allow us to specify the GitHub enterprise endpoints probably because they think it will help them gain more traffic on Bitbucket (which seems absurd to me). This is coupled with the trend of developers simply wanting to get their work done and rather than put in time to add that pressure, they pivot and search for the next viable solution, even though they love SourceTree.

I'm not really sure what the purpose of a Feature Request is at this point.


author: Ana Retamal
body: Hi Anupam! We do plan on supporting this, but unfortunately other things got in the way. Please vote for our feature request at [SRCTREE-2992](https://jira.atlassian.com/browse/SRCTREE-2992). You can also add a comment and watch it to receive future updates.

Best regards,

Ana

comments: author: S Smith (James)
body: That issue was opened in March 2015....

You made your comment in July 2017...

It's July 2018 now...

It's hard to think that there was ever any intent to make this happen, especially such a crucial function that would not be that difficult to implement.
Unable to pull latest changes to branch
Asked by Wayne Cochran:

I pushed a change on a branch (named 'stitching') that I alone am working on:

```
$ git push origin stitchingCounting objects: 6, done.Delta compression using up to 4 threads.Compressing objects: 100% (6/6), done.Writing objects: 100% (6/6), 787 bytes | 0 bytes/s, done.Total 6 (delta 4), reused 0 (delta 0)remote: remote: Create pull request for stitching:remote:   https://bitbucket.org/vokecoredev/fae/pull-requests/new?source=stitching&t=1remote: To bitbucket.org:vokecoredev/fae.git   9099d1f2..0b182a5c  stitching -> stitching
```

(Aside: I am not sure why it said it is creating a "pull request" since I am not pushing to a branch anyone else is managing, but I can see the update on bitbucket. FWIW, I marked it as approved.)

On another machine I do a git pull on the same branch and I my changes are not there -- why not?

```
git pull origin stitching
```

Where are my changes


Answers:
author: Ana Retamal
body: Hi Wayne, that command alone will not really work as you expect. You'll need to checkout to the branch you want first, and the push:

```
git checkout <myBranch>

git push origin <myBranch>
```

With your initial command, what happened is that you pushed your branch into master. I've checked the repository and I could see it belongs to a team where other users are making contributions too, that's why the PR was created.

The above also answers why the git pull in the other machine didn't have your changes, since the changes are in master now.

Hope this helps you!

Best regards,

Ana
Update to 2.1.2.5 crashes when starting
Asked by Richie Olson:

I updated my sourcetree to 2.1.2.5 and now when I try to open the program it just crashes. I have to reinstall the old version over top of it to be able to view/update my repositories. Help!!


Answers:
author: Mike Corsaro
body: Hello! Does a crash report dialog get displayed when this happens? If so, can you submit the report and let me know what the issue key is? Thanks!

comments: author: Richie Olson
body: ![Sourcetree Crash.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/3292i2B9207DF149D08C6/image-size/large?v=v2&px=999 "Sourcetree Crash.JPG")This?
Cant start new feature using Git flow in Source Tree
Asked by SHRUTHI PANNALA:

Hi Team,

I am not able to start new feature under my evelop branch,

when I try to enter feature name , it is shwoing beside release\\ not beside Feature\\ (Please find the attached screen shot showing issue).

Even though i proceed creating feature like this ,it is throwing error mesage saying initilize git flow, i did initialize git flow but still showing the same error.![StartFeature.png](/t5/image/serverpage/image-id/2990i107B975512F8CAC2/image-size/large?v=v2&px=999 "StartFeature.png")![Errorjpg.jpg](/t5/image/serverpage/image-id/2991i73E14A1686677872/image-size/large?v=v2&px=999 "Errorjpg.jpg")


Answers:
author: Ana Retamal
body: Hi Shruthi, can you let us know which SourceTree version and OS are you using? We had a bug regarding Git flow initialization reported at [SRCTREEWIN-7409](https://jira.atlassian.com/browse/SRCTREEWIN-7409), can you check if that's your case too?

Best regards,

Ana
Sourcetree + Git LFS unable to commit file
Asked by Daniel Wenograd:

So this is a problem that's -only- come up in the last week or two, but it's completely rendered me unable to commit files to Git. Before this, I was able to get files to Git LFS that were 4+gb large without any problems, now it struggles to get anything past 20mb up there. Basically, it starts uploading, then at a random amount up, it shoots back down and continues as normal, until it loses even more data and drops again. This continues until Git finally gives up and drops the connection. I've tried both embeded Git and 64 bit system Git, doesn't seem to have any effect. I've even tried moving the lfs folder in the .git folder to another directory just in case something got corrupted, and it still has the same problem.  

Any help at all would be greatly appreciated.  

Here's the log:  

<https://pastebin.com/sZD15Hh9> (Wouldn't let me put the log in the post)


Answers:
author: Mike Corsaro
body: Hello! This appears to be a VSTS issue as it's timing out on their end. I'd recommend opening a ticket with them, but before you do that could you try the following?

* Push via the command line. You can copy+paste the command SourceTree shows in the log
* Increase the LFS timeout: <https://github.com/git-lfs/git-lfs/issues/1490>

comments: author: Daniel Wenograd
body: I tried increasing the timeout and using the command line, neither helped. I'm going to submit a VSTS ticket and see if anything comes of it. Thank you for the help!


Tags: git

git-lfs
Version 2.1.2.5 File list window - file name pops out on mouse over
Asked by gnorkett:

I am wondering if this is a new feature in version 2.1.2.5 of SourceTree for Windows.

In Log View, under the list of files window, when you hover over a file it appears to pop out slightly. If this is a new feature, is there a way to disable it?


Answers:
author: Mike Corsaro
body: Hello! This is an intentional behavior: it's so that longer file names (ie: a file inside a few folder) can be easily seen when you hover over it. There isn't currently a way to disable it.
Can't stage all
Asked by Adam McWilliam:

When trying to stage all, they won't go to the staged files.

![Capture.PNG](/t5/image/serverpage/image-id/2910i7C80D29F25E8EFE0/image-size/large?v=v2&px=999 "Capture.PNG")


Answers:
author: Ana Retamal
body: Hi Adam! Can you let us know which version of SourceTree and OS are you using so we can try reproducing this issue?

Best regards,

Ana