youngmon/atlassian-qna huggingface dataset:
Bitbucket Branch History
Asked by Baharul:

Hi Team,

How can I know branch history of bitbucket like when that branch is created , from which branch \& by whom ?

Thanks

Baharul Islam


Answers:
author: Michael Walker
body: Hey there Baharul,  
Working with branches empowers us all to keep track of our commits and helps us keep a repo organized, however, Git is an interesting creature as it doesn't actually keep commits organized under branches under the hood. Branch names can easily be reused and even changed over time. They can also branch multiple times from multiple places in seemingly chaos which unfortunately makes tracing back a branch's origins nearly impossible. With that said, you do have a few options at your disposal.  
First, you can use the "git log --graph --all" option (potentially with "--pretty=format:...") and visually trace back a branch to see what [commit it branched from](https://stackoverflow.com/questions/1549146/git-find-the-most-recent-common-ancestor-of-two-branches) (also referred to as an Ancestor Commit) and then (assuming the history is easy enough to read/understand) trace back up to find out which branch that commit was on at the time of the branch. That at least will tell you what branch, or at least commit, a given branch came from. From there, you can use the "git log" to [determine the next commit's comitter/author details](https://stackoverflow.com/questions/2263674/how-do-i-find-the-next-commit-in-git-child-children-of-ref), telling you who published the first change on this given branch.   

With all of that said, if you want to do things in the Web UI, you can also d them there, however, they are still a bit limited. You can absolutely look at the commit history and view the first commit and it's details all fairly easily but once a branch is created, it's still very difficult to say what branch is was created from.  

Just as an extra bit of context, this [stack overflow discussion](https://stackoverflow.com/questions/3161204/how-to-find-the-nearest-parent-of-a-git-branch) goes into detail on how git keeps things organized under the hood. The question he is answering doesn't really apply to you but the answer definitely explains a lot so it may be worth reading.  

Extra Note: It also looks like you can GET the parent commit details for a given branch via [this REST API endpoint](https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/refs/branches/%7Bname%7D#get) so give it a look if that's what you're still potentially looking for.  
Best of luck!


Tags: atl-gruland

bitbucket-cloud

cloud
Possible to add video to pull request comment?
Asked by lukemmtt:

I'm new to bitbucket and I'm interested in adding a video or a file to a comment in a bitbucket pull request. Is this possible?


Answers:
author: Hana Ku?erov?
body: Hi [@lukemmtt](/t5/user/viewprofilepage/user-id/4504591) ,

welcome to the Atlassian Community!

It doesn't seem it's possible. Only to add a video to pull request description or add a link to a video. Do you want to demonstrate something using a video? For me it was always better to do the conversation about the problems in the issue associated with the change, not in the Bitbucket itself, But I don't know your use case and maybe it's not possible...


Tags: bitbucket-cloud

cloud
How to send failure message
Asked by Jason Harrison:

Is it possible to send a failure message for a pipeline?


Answers:
author: Oleksandr Kyrdan
body: Hi [@Jason Harrison](/t5/user/viewprofilepage/user-id/4055349) ,  

Thank you for your question!

Could you clarify your case to help you?

If you mean to send notification about failed build to slack or email, you could setup **after-script**:

```
image: atlassian/default-image:2

pipelines:
  default:
    - step:
      name: Build
      script:
        - echo "Main logic here... If step failed slack-notify pipe will send a message."
      after-script:
        - if [[ BITBUCKET_EXIT_CODE -eq 0 ]]; then exit 0; else echo "Step failed"; fi
        - echo "Step failed"
        - pipe: atlassian/slack-notify:1.2.0
          variables:
            WEBHOOK_URL: $WEBHOOK_URL
            MESSAGE: 'Hello, world!'

```

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-pipelines

cloud

slack
Log-in email no longer valid
Asked by SeeHigher:

The domain I used for my login email is no longer active, and too expensive to reactivate. IS there a workaround since I remember my login and password? The email is the sticking point.


Answers:
author: Caroline R
body: Hi, [@SeeHigher](/t5/user/viewprofilepage/user-id/4504106)! Welcome to the community!

The account ownership of **Personal non-managed accounts** is verified based on the **Primary email address** associated with the Bitbucket Cloud account, this also includes the **Primary billing user email address** in case it's different from the primary email on the account.

Also, if you have a confirmed email alias associated with this account, the support team can evaluate the case and follow our policy for managed and non-managed accounts.

On the other hand, when the primary email address on the account is **managed** by an organization that has claimed and confirmed the company domain with Atlassian, these accounts are considered ownership of the Organization and are managed by the **Organization's Admins**.

In case you would like to read more about Bitbucket Cloud account ownership and data access, you can access the following article:

* <https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Cloud-account-ownership-and-data-access/ba-p/1311340>

Please, feel free to share any additional questions regarding this subject.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Deploy only works if config file is yml
Asked by davi.carvalho:

On some serverless framework templates, the configuration file is a "serverless.ts" file, but when I run with this pipe, it throws an error saying "? serverless.yml doesn't exist."


Answers:
author: Halyna Berezovska
body: [@davi.carvalho](/t5/user/viewprofilepage/user-id/4503783) have you tried to pass CONFIG variable precisely, so that the pipe does not put the default value?

```
script:
  - chmod 005 my-script.sh
  - pipe: atlassian/serverless-deploy:1.0.0
    variables:
      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
      CONFIG: 'serverless.ts'
```

The thing is that the most often used is serverless.yml config file and we cannot change it, because for most users it works like this.

However, for your custom solution you just pass config file like above.

Looking forward to seeing your feedback, we are happy to communicate to choose the best solution!

If you're happy with such solution, we will update the documentation

Regards, Galyna

comments: author: davi.carvalho
body: Thanks! Yeah, this should work fine for us.

Will change and I'll give you a response


author: Oleksandr Kyrdan
body: Hi [@davi.carvalho](/t5/user/viewprofilepage/user-id/4503783)

Thank you for your question!

We'll investigate this feature and notify you!

Cheers,  
Oleksandr Kyrdan


Tags: bitbucket-pipelines

cloud

lambda
Accessing repo's ssh public key in pipeline script
Asked by Mike Pham:

Is there a way that I get the SSH public key that I set up for the repository? I've tried looking into the *.ssh* directory and I can't find *id_rsa.pub* . I also looked into *.ssh/config* and I can see that the identity file is in*/opt/atlassian/pipelines/agent/ssh*, but I can't find any public key in there either.


Answers:
author: Theodora Boudale
body: Hi [@Mike Pham](/t5/user/viewprofilepage/user-id/4447276) and welcome to the community!

I don't think that the public SSH key is available, but you can create the file in the script of the step where you want to use it, and then access it.

If you add the following command in your script

```
ssh-keygen -y -f /opt/atlassian/pipelines/agent/ssh/id_rsa > /tmp/id_rsa.pub
```

it will create the public SSH key from the repo's private SSH key and store it in /tmp directory (because it is not possible to write in the directory /opt/atlassian/pipelines/agent/ssh/).

Another way would be to copy the public key from the repo's Settings and use that command instead in the script:

```
echo "paste_public_key_here" >> /tmp/id_rsa.pub
```

That command would need to get updated though if you decide to change the SSH keys in the repository.

Please feel free to let me know if that works for you and if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-pipelines

bitbucket-cloud

ssh-key
TestNG tests run locally but not in bitbucket pipelines
Asked by Patr?cia Correia:

Hello :)  
I'm facing a problem with maven and testNG tests. I have a maven project for UI tests and I use selenium and testNG. I also have a testng.xml.

All I do on the terminal is "mvn clean test" and they all run okay.

My bitbucket-pipelines.yml:

```
image: atlassian/default-image:2
pipelines: 
  branches: 
    feature/*: 
      - step: 
           script: 
              - mvn --version 
              - apt-get update 
              - apt-get upgrade -y 
              - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 
              - yes | apt-get install ./google-chrome-stable_current_amd64.deb -f 
              - apt-get install -y testng 
              - mvn clean test
```

The "mvn clean test" runs properly until it gets messed up with the "@BeforeClass, @AfterClass, etc", methods... It seems like it replicates them because it has no notion of the testng.xml file.

I tried to run the testng.xml but no success at all...

What might this be? Thanks.


Answers:
author: Eduardo Asenjo
body: Hi Patricia,

Here's a sample bitbucket-pipelines.yml file I use normally in my Selenium Projects, hope it helps.  

```
image: atlassian/default-image:2
  pipelines:
    branches:
      master:
        - step:
            name: 'Selenium Test - Chrome'
            script:
              - mvn clean test
            services:
              - chrome
            caches:
              - maven
definitions:
  services:
    chrome:
      image: selenium/standalone-chrome
```

Using different images and services instead of downloading and installing software in flight will save you also some time  

EDIT:  
The selenium for chrome will open a RemoteURL , so make sure your WebDriver contains the remote URL.  

<br />

```
URL remoteURL = new URL("http://localhost:4444/wd/hub");

driver = new RemoteWebDriver(remoteURL, chromeOptions);
```


author: Julissa Mendez
body: Please let me know if you got to resolve this issue, thanks


Tags: bitbucket-pipelines
Why is the default S3_KEY expanding to 'None' when using aws-elasticbeanstalk-deploy pipe?
Asked by Caleb Scholze:

Currently, I'm not specifying an S3_KEY when using the aws-elasticbeanstalk-deploy:1.0.1 pipe to deploy a .NET Core application bundle as a zip file.

When the pipe pushed the artifact to S3, the default value for the S3_KEY is set to ${APPLICATION_NAME}/${VERSION_LABEL}. The pipe runs as expected and deploys an artifact, but the actual artifact is uploaded with the key ${APPLICATION_NAME}/None.zip.

It seems as though the ${VERSION_LABEL} is not expanding as part of the upload function in the pipe source code, specifically line 129 in pipe/pipe.py where it calls \`self.get_variable('S3_KEY')\`. I could not locate the implementation of \`get_variable()\`, but it appears to be returning 'None' here, which is then used to construct the 'source_bundle_key' on line 140.

Here is log output from the pipe running in debug mode showing the failed expansion 'Artifact uploaded successfully to s3://sample-s3-bucket-name/SampleAppName/None'.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Caleb Scholze](/t5/user/viewprofilepage/user-id/3855486)

Thank you for your feedback!

We are investigating this behaviour and notify you.

Best regards,  
Oleksandr Kyrdan


Tags: aws

bitbucket-pipelines

cloud
I am not able to get invitation email to my company email
Asked by Bhakti:

My other teammates got the invitation but I am unable to get it.


Answers:
author: Daniel Eads
body: Hi [@Bhakti](/t5/user/viewprofilepage/user-id/4503316) , welcome to the Community!

The email address you mentioned returned an error to our mail delivery service:
>
> ```
> 550: 550 #5.1.0 Address rejected
> ```

I've cleared the error out on our end, but it's possible there might be something amiss with your company's email server. I would suggest trying to send your company email address an email from an outside account - perhaps a gmail address - and seeing if you receive it at your company email. If so, you should be clear to resend the invitation email from Bitbucket and have it properly delivered this time around.

Cheers,  
Daniel \| Atlassian Support

comments: author: Bhakti
body: Thank you


Tags: bitbucket-cloud

cloud
Download feature in Bitbucket website sidemenu only pulls readme
Asked by Byron K:

Hi all, I use the Download Repo feature in the bitbucket website regularly to create offsite backups, today when I tried to use this feature (on multiple browsers) it would only download a zip with a readme, and nothing else (1kb), when the repo says it's 245.8 MB. I've checked all my javascript blockers, they're not running on this browser (or on other browsers where I haven't installed them). Is this a temporary server issue, or did something else happen?

Thank you!


Answers:
author: Mark C
body: Hi [@Byron K](/t5/user/viewprofilepage/user-id/4503219)  

Welcome to the community.

By default, the compressed .zip file from the repository **Downloads** section only downloads your repository **master** branch.  
For this, would it be possible for you to check if your repository **master** branch has other files and/or folders other than the readme file?

You also mentioned that you're making backups of your repository.  
In this case, our recommendation is for you to clone your repository via **--mirror** clone instead.  
This way, the backup includes all your repository branches.

```
git clone --mirror <your repository URL (HTTPS or SSH)>
```

Hope it helps and let me know how it goes.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Error after upgrading to Mountain Lion OS (git-svn)
Asked by Ricardo Garcia:

Hi!

I've installed Mountain Lion in my mac book, and now I can't push changes to my remote SVN server.

The error I get is the following:

git -c diff.mnemonicprefix=false -c core.quotepath=false svn rebase

Can't locate SVN/Core.pm in @INC (@INC contains: /usr/local/git/lib/perl5/site_perl /Applications/dev/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.4 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at /Applications/dev/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svn line 41.

Completed with errors, see above

Any ideas of why this might be happening?

Thanks in advance!!!


Answers:
author: stevestreeting
body: Mountain Lion removed the default install of Subversion unfortunately. Do you have XCode installed?

On a fresh Mountain Lion install, one way to get git-svn working again is to:

1. Install XCode 4.4
2. Open XCode and in Preferences \> Downloads, click 'Install' next to 'Command line tools'

This worked for me on a completely new ML machine.

I've also seen another article about this: <http://victorquinn.com/blog/2012/02/19/fix-git-svn-in-mountain-lion/> - however I've never needed to do that. Just installing XCode and the command line tools worked great for me.

comments: author: Ricardo Garcia
body: Hi Steve!

It worked like a charm, thank you very much for your help!

Cheers!
Integration with Araxis Merge?
Asked by Pavel Pola:

Hello, has anybody running integration with Araxis Merge? I have installed command line tools, set up path but SourceTree still says "Cannot find Araxis Merge". Does anybody know what should I check?

Thanks for help.

Pavel


Answers:
author: stevestreeting
body: Did you install the command-line tools in the recommended location, or somewhere else that you then added to your PATH? Because PATH doesn't affect Mac OS X apps SourceTree looks in the standard locations only such as \~/bin, /bin, /usr/bin, /usr/local/bin.

comments: author: Pavel Pola
body: Hi Steve, I have installed it in \~/Library/AraxisUtilities and moving to \~/bin helped. Thank you.


author: David Rees
body: Starting with Araxis Merge 2013.4283 (released 14 January 2013) the utilities are now placed inside the application bundle at "/Applications/Araxis\\ Merge.app/Contents/Utilities/" so perhaps SourceTree can be updated to just look for them there. So folks just need to install Araxis Merge and then choose it in SourceTree with no copying/linking of files.

More info:

<http://www.araxis.com/merge_mac/ReleaseHistory.html>

<http://www.araxis.com/merge_mac/topic_installingfromweb.html>

Actually, I went ahead and created a Feature Request for this - <https://jira.atlassian.com/browse/SRCTREE-1370>


author: Ken Taylor
body: I found the utilities installed to /Applications/Araxis Merge.app/Contents/Utilities

I had the same issue integrating them with SourceTree and tried the solution of creating links to araxisgitdiff and araixisgitmerge in \~/bin with no success.

I did have success by copying all the files in the utilties folder to /usr/bin using:

sudo cp /Applications/Araxis\\ Merge.app/Contents/Utilities/\* /usr/bin


author: stevestreeting
body: SourceTree only needs to be able to see the command line tools 'compare' and 'araxisgitmerge' (or 'araxishgmerge') in the usual path locations such as /usr/local/bin.

Unfortunately Araxis's instructions about adding /Applications/Araxis Merge.app/Contents/Utilities to the PATH variable to resolve their changes in the latest versions doesn't work for any Mac OS X apps, since the PATH variable has no effect there, it only affects terminals. The quickest way to resolve it is to do this:

ln -s /Applications/Araxis\\ Merge.app/Contents/Utilities/compare /usr/local/bin/compare  
ln -s /Applications/Araxis\\ Merge.app/Contents/Utilities/araxishgmerge /usr/local/bin/araxishgmerge  
ln -s /Applications/Araxis\\ Merge.app/Contents/Utilities/araxisgitmerge /usr/local/bin/araxishgmerge

\~/bin isn't on the path for Mac OS X apps by default so that's why it didn't work when you did that.


author: Hubert SARRET
body: There is a typo on third command Steve should be

ln -s /Applications/Araxis\\ Merge.app/Contents/Utilities/araxisgitmerge /usr/local/bin/araxisgitmerge

Cheers


author: Pavel Pola
body: Sorry, I forgot: Mac OS X, 10.7.4


Tags: araxis

integration

merge
How to show working copy bookmark's title in SourceTree's title bar instead of working copy's directory name?
Asked by Paul Hoepfner-Homme:

Loving SourceTree, but I've got a major conundrum.

I have numerous working copies of a particular software project installed in different locations. We have a "free" version and a "premium" version of the software, and within those versions I have various local installation contexts to be able to do proper compatibility testing. Because they are all working copies of the same project, they all share the same directory name (in this case it is a WordPress plugin we wrote, and it must have exactly the same directory name in all cases).

Thankfully, the repo bookmarks list allows you to rename a bookmark to distinguish the various working copies from one another, which I've done.

However, mysteriously, I can't find any way to view that distinguishing feature in the SourceTree explorer windows of these working copies. They all share the same title in their title bars - the name of the directory. I'm surprised these windows wouldn't use the bookmark name to distinguish themselves, or mention the bookmark name anywhere at all in the UI. There's actually no way I can tell which working copy a particular SourceTree window is associated with except by right-clicking a file and clicking "Reveal in Finder" to make sure.

This makes SourceTree totally impractical to use when working with multiple working copies that share the same directory name. I feel like something as obvious as this couldn't possibly have been overlooked by what is otherwise the best Git GUI I've ever used, and I probably just haven't configured something properly.

Any thoughts/help would be most appreciated!


Answers:
author: stevestreeting
body: That's odd, because actually SourceTree does display the bookmark name in the title bar - I have exactly the same kind of setup here and indeed, the bookmark name is how I differentiate my repo windows.

I wonder, did you open the repository window direct either from Finder/Terminal or via File \> Open, and then add the bookmark later, or maybe open the unnamed repo window first then changed the bookmark name? Maybe the new name just hasn't propagated properly (it's supposed to, but I just did a quick test with renaming a bookmark here and it didn't).

Please try closing SourceTree and re-opening it to see if that solves the issue. I'll look at the propagation issue, that's a bug.

comments: author: Paul Hoepfner-Homme
body: Ah, sweet! Just had to restart the program to get it to work. I guess I hadn't restarted it in a week or so, and I renamed by working copy bookmarks within the last week. I did try closing the explorer windows and reopening them from the bookmarks - just hadn't tried restarting the whole program. Glad it's just a small bug. Cheers!


author: stevestreeting
body: Bookmark renaming / title sync bug logged here: <https://jira.atlassian.com/browse/SRCTREE-1128>
Can authored-at dates be shown in log view?
Asked by Gabe da Silveira:

In git it is quite a common workflow to rebase local work or even topic branches at the time of merging. In doing so, SourceTree ends up showing the commit date instead of the authored date such as you see normally in git-log or gitk. The rebase date is of little practical use and also very easy to infer, whereas author date is much more useful. Is there a setting to switch this somewhere?

here's a screenshot illustrating the issue:

<https://skitch.com/e-dasil003/e8rhj/ma-git>


Answers:
author: stevestreeting
body: The main reason the commit date is used is because git is inconsistent: when you search for a date range (git log --since for example), the commit date is always used, not the author date. Therefore using the author date would make the results look wrong.

Two options have been considered so far: an option in Preferences (although this is likely to raise th above issue), or simply adding the author date to the commit details pane when it differs from the commit date. Discussion is here: <https://jira.atlassian.com/browse/SRCTREE-779>

comments: author: Gabe da Silveira
body: Thanks mate, I posted my diatribe there ;)