youngmon/atlassian-qna huggingface dataset:
Bitbucket v4.9.1: Jenkins Webhook
Asked by Raghu Vamsi:

Hi Team,

I am trying to setup a [Bitbucket Server Webhook to Jenkins.](https://escmstash.1dc.com/projects/TP-GBS/repos/carat_poc/settings/hooks#)

I am not able to find out what should be the URL to be used?

As per the documentations online, i tried 2 below and keep getting error. Please suggest and redirect me to the right documentation for Bitbucket v4.9.1.

1. Error is Authentication: I have already setup build execution access to anonymous user: https://\<JenkinsURL\>/job/WebhookTesting/build?token=myToken
2. Error is Page Not found: [https://\<JenkinsURL\>/bitbucket-hook/](https://w1qvap1320.1dc.com:8443/bitbucket-hook/)


Answers:
author: Raghu Vamsi
body: It worked for me after keeping URL as just jenkins URL and enabling SCM in jenkins config.

Not clear on why SCM is mandatory. But it works.


Tags: bitbucket-server

jenkins

server
Not receiving email invitation to a Bitbucket git repository
Asked by Alain Gonzalez:

Hi,

My team is inviting me to have access to a new git repository they created on Bitbucket, they have tried several times since last week and I'm not receiving the invitation on my email. We checked that my email address was correct and I checked in all my mail folders: spam, junk, archive, etc.. And nothing.

Please help me with this issue.

Thanks,

Alain


Answers:
author: Caroline R
body: Hi, Alain! Welcome to the community!

We performed an analysis on our logs and confirmed that your email had a block on the server that prevented emails from being sent to this recipient. This can occur when the system tries to send an email to the user and the account does not exist yet, is not activated, or it rejects the email for some internal reason. The message on your email was:
>
> ```
> 550 5.7.1 : Recipient address rejected: User email address is marked as invalid.
> ```

In this case, I have removed the block from your email. Could you please ask your team to remove the invitation and send you a new one? They can do this by following the next steps:

In case they have invited you to a **specific repository**:

* Access the workspace \> Go to the repo they have invited you to;

* Access the **Repository Settings** \> **User and group access;**

* Click on the "invitation pending";

* Select the "Cancel invitation" option to remove the invitation;

* Add your email again to send a new invitation.

In case they have invited you to a **group on this workspace**:

* Access the workspace \> Go **Settings**;

* Access **User groups** \> Open the group they have invited you to**;**

* Click on the "invitation pending";

* Select the "Cancel invitation" option to remove the invitation;

* Add your email again to send a new invitation.

Please let me know how it goes.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

git

repository
How to download all branches in one-click?
Asked by IntuzCloud:

Hi,

I have one repository and that has around 76 branches. I want to download all the branches in one shot. Is it possible to download all the branches' source code in one download?


Answers:
author: Caroline R
body: Hi, [@IntuzCloud](/t5/user/viewprofilepage/user-id/3948487)!

Thank you for reaching out to Atlassian Community!

Currently, this is not available on Bitbucket yet, you'll need to download the branches one by one. However, as you have several branches, we do understand that this option would improve your experience using Bitbucket, so I went ahead and created a feature request to add the option to download all the branches at once:

* <https://jira.atlassian.com/browse/BCLOUD-21300>

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

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

Kind regards,  
Caroline

comments: author: IntuzCloud
body: Hi Caroline,

Thanks for creating the feature request. I have added my Vote for this request.

With Regards,

Bimal Shah


Tags: bitbucket-cloud

cloud
Bitbucket cloud: s2s auth via username and password
Asked by Pimentero:

Hi!

I'm trying to config Post commit status to Bitbucket Cloud in teamcity (quite old one) and it requires username/password to send hooks on commit checks. I found App Passwords, but they are connected to my personal account, and if I someday will quit my job, will these tokens be rejected? Maybe there is some other tool for making tokens that connected to team account?


Answers:
author: Mark C
body: Hi [@Pimentero](/t5/user/viewprofilepage/user-id/4522380)

Welcome to the community.

The answer is yes. If one day you'll quit your job and your App password is used for the CI tool (e.g. Teamcity), if someone removed your permission to access Bitbucket Cloud, the App password will be unusable for the CI tool.

You have 2 more options regarding this:

* Create a bot account in Bitbucket Cloud with permissions to access your repositories, use that account to [generate an App password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/), and use it for your CI tool (Teamcity)
* I'm not sure if Teamcity supports access tokens, however, in Bitbucket Cloud under your Team workspace, you can use [OAuth consumer keys to generate an Access token](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html) and use that for authentication

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

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Pass Docker Build Arguments to bitbucket-pipe-release
Asked by Andreas Falk:

We use your great pipe "bitbucketpipelines/bitbucket-pipe-release" to create a pipe that runs a maven build. Now we need to enhance this to generate pipes for different Java versions. This would be quite easy if we could pass the name of the base image as a build argument to the pipe.

Is it plannend to enhance the pipe that you could pass docker build arguments?


Answers:
author: Halyna Berezovska
body: [@Andreas Falk](/t5/user/viewprofilepage/user-id/3537318) you can pass the name of base image as IMAGE pipe variable. E.g

```
- pipe: atlassian/bitbucket-pipe-release:4.0.1
  variables:
    DOCKERHUB_USERNAME: $DOCKERHUB_USERNAME
    DOCKERHUB_PASSWORD: $DOCKERHUB_PASSWORD
    IMAGE: your-image
```

The version is either defined manually as pipe variable: VERSION: my-ownversion-10 or you use our bump version process accordingly to semversioning - for that you have to follow our semversioning bump process: <https://bitbucket.org/atlassian/bitbucket-pipe-release/src/master/CONTRIBUTING.md> - release process section.

Let's start a dialog in the case of more questions

Regards, Galyna


Tags: bitbucket-pipelines

cloud
Deployment Pipepline for Database-Deployment
Asked by Marc Schulte:

Cound anyone tell what is needed for a complete Deployment Pipeline where i want to deploy some Database Changes in PL/SQL and SQL to our Server ?

I really dont know where to start, so i would be really thankfull if anyone could help me getting started with this


Answers:
author: Halyna Berezovska
body: [@Marc Schulte](/t5/user/viewprofilepage/user-id/4522361) if you use some cloud providers for database (like AWS RDS or some Google db), check out appropriate docs.

But for general postgre database you could use docker containers for example.

This is often and handy case to setup db at servers - you have kind of isolated environment for db, fixed version and other advantages of docker containers.

You can easily replace containers up behaviour and container images .

For example on when containers is up you will do necessary migrations.

Use docker run behaviour or docker-compose files for this


Tags: bitbucket-pipelines

deployment
FTPdeploy not answering
Asked by Nicolas BROUET:

When I use my bitbucket pipeline, it's always stucked at :

    + lftp -u '$FTP_LOGIN,$FTP_PASSWORD' -e 'set ftp:ssl-allow no; mirror  --delete-first -vvv --exclude=.gitignore --exclude=http://README.md --exclude=bitbucket-pipelines.yml -R /opt/atlassian/pipelines/agent/build /htdocs/myfolder;quit' xxx.xxx.xxx.xxx

    INFO: Starting FTP deployment to xxx.xxx.xxx.xxx:/htdocs/myfolder...

It can stay 10 minutes here, no response, no message, even with -vvv ...  

Is there anyway to know what's going on ?  

My ftp has a firewall, I thought it could be the culprit, but I allowed all bitbuckets IPs with no effect.  

Here is my latest yaml file :
>
> ```
>
> #!yaml
> image: atlassian/default-image:2
> options: 
>   max-time: 6 #Configure default 10 minute timeout
>
> pipelines: 
>   custom: 
>     DeployToFTP: 
>       - step: 
>         name: 'Deployment to PRODUCTION' 
>         deployment: production 
>         script: 
>           - echo "Deployment to FTP starting now" 
>           - pipe: atlassian/ftp-deploy:0.3.6 
>             variables: 
>               USER: "$FTP_LOGIN" 
>               PASSWORD: "$FTP_PASSWORD" 
>               SERVER: "$FTP_IP" 
>               REMOTE_PATH: "$FTP_PATH" 
>               DELETE_FLAG: 'true' 
>               DEBUG: "$FTP_DEBUG" 
>               EXTRA_ARGS: "--exclude=.gitignore --exclude=README.md --exclude=bitbucket-pipelines.yml" 
>           - echo "Deployment to FTP finished" 
>         artifacts: 
>           - /opt/atlassian/pipelines/agent/build/**
> ```


Answers:
author: Oleksandr Kyrdan
body: Hi [@Nicolas BROUET](/t5/user/viewprofilepage/user-id/4522190)

Thank you for your question!

Have you check if it's possible to connect to you server from bitbucket pipelines before using the pipe?

Best regards,  
Oleksandr Kyrdan

comments: author: Nicolas BROUET
body: No, I havent checked that...  
How do you do that ?


author: Oleksandr Kyrdan
body: How about this one?

```
- ping?SERVER_IP
```


Tags: bitbucket-pipelines

ftp
Is there a way to know last month pipeline minutes used?
Asked by Vibhanshu Biswas:

I just want to now like how many minutes did we use in previous bill cycle? is there a place where I can observe this?


Answers:
author: Caroline R
body: Hi, [@Vibhanshu Biswas](/t5/user/viewprofilepage/user-id/3566293)!

Thank you for reaching out to Atlassian Community!

Currently, Bitbucket UI doesn't keep track of how many minutes were spent in the last months, as after being billed, this information is replaced by the current month's usage. At the moment, we do not have a report with the historic usage of build minutes - we can still see the current month's data when you access the workspace \> **Settings** \> **Plan details**.

We have a Feature Request opened ([BCLOUD-13637](https://jira.atlassian.com/browse/BCLOUD-13637)) for this as well. I encourage you to vote for the issue and to add a comment with your use case if it is something that you're interested in seeing.

I also see you are part of a Standard License workspace - paid customers are able to create a ticket and ask for that information ad-hoc through our support portal.

Please, feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
I stopped receiving bitbucket and JIRA email notifications since August 11, 2021 (+8:00 UTC)
Asked by Mark Joshua Abrenica:

Please troubleshoot my account why I stopped receiving email notifications since August 11, 2021. My workmates still receive their notifications, but as for me, for merged PRs and mentions in JIRA, i am not receiving any notifications


Answers:
author: Caroline R
body: Hi, [@Mark Joshua Abrenica](/t5/user/viewprofilepage/user-id/2645950)!

Thank you for reaching out to Atlassian Community!

I checked our logs and confirmed that your email had a block on the server that prevented emails from being sent to your address. So, I removed your email from this suppression list.

Could you please confirm if you receive the notifications now?

Kind regards,  
Caroline

comments: author: Mark Joshua Abrenica
body: Ah yes. Thanks


author: Charlie Misonne
body: Hi Mark,

The community members will not be able to troubleshoot your account as we don't have access to your environment.  
For technical issues you can contact Atlassian Support.

But as your colleagues are getting emails I doubt the issue lies in your environment. First of all you should check for obvious issues:

* Check your spam folder
* Check whether your email address is correct in your Atlassian profile.
* Check your personal notification settings in your profile (click profile picture in Jira -\> Personal Settings)

If that doesn't solve anything a Jira admin should be able to troubleshoot notification rules.

And as a last resort you can contact Atlassian Support: <https://support.atlassian.com/>


Tags: bitbucket-cloud

cloud

jira
How the pipeline use an HTML report in the build and make it available for review
Asked by Wassim Drira:

Hello,

I use pipeline to make the dependency check to find vulnerabilities in dependencies

```
pipelines: 
  custom: 
    generateVulnerabilitiesReport:
      - step:
        name: Generate Vulnerabilities Report
        caches:
          - maven
        script:
          - mvn compile org.owasp:dependency-check-maven:aggregate  
```

Then, an HTML report is generated, shown in build console as follows:

```
?[INFO] Writing report to: /opt/atlassian/pipelines/agent/build/target/dependency-check-report.html
```

My concern is how to make this report available to be reviewed later and be shown the pipeline result.

Thanks for your help


Answers:
author: Theodora Boudale
body: Hi [@Wassim Drira](/t5/user/viewprofilepage/user-id/2729232) ,

You can add the following in your bitbucket-pipelines.yml file, in the script that generates this file, after the command that generates it:

```
- cat target/dependency-check-report.html
```

When a build finishes, if you expand this command in the Pipelines log, you will see the content of this file.

Is this something that works for you?

Kind regards,  
Theodora

comments: author: Wassim Drira
body: Hi,  
Thanks for your help. I am looking for better solution to make report readable on the execution result.

best regards


author: Theodora Boudale
body: Hi Wassim,

Thank you for your reply.

I'm not sure what are the contents of this file, but if the issue with the 'cat' command is html tags cluttering the output, you can try using a text-based web browser, like lynx or w3m.

You can install either of these tools during the Pipelines build and then display the contents of the report. If you're using in Pipelines a Docker image based on Ubuntu, you can do the installation and display the report by using these commands in your yml file:

w3m:

```
- apt-get install -y w3m
- w3m -dump target/dependency-check-report.html
```

lynx:

```
- apt-get install -y lynx
- lynx -dump target/dependency-check-report.html
```

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

java

maven

vulnerability
Pipeline apt-get fails
Asked by JoeHz:

This has been a stable pipeline script that has worked for more than a couple of years. It just ftp's up the changes to the place we need them after they are pushed to bitbucket. You can google and find a very close example to it.   

I have a hard time believing nobody else would be encountering such an error about the content at security.debian.org, so I'm wondering if the underlying linux that this runs under has an issue that Atlassian needs to address.   

<br />

<br />

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


Answers:
author: Caroline R
body: Hi, [@JoeHz](/t5/user/viewprofilepage/user-id/3554472)!

Thank you for reaching out to Atlassian Community!

I believe this issue is related to the following discussion at Stack Overflow post:

* [Debian 11 Update broke](https://stackoverflow.com/questions/68787732/debian-11-update-broke-samueldebruyn-debian-git)

This issue has been raised with the owner of the image - [Failing to build pipelines? #2](https://github.com/sdebruyn/docker-debian-git/issues/2), the owner of the issue mentioned that they are looking to fix it soon.

If the issue has not been fixed by the owner you can try the following alternate workaround such as:

* Create your own custom image that you maintain yourself
* Use another image
* Use our default Docker image atlassian/default-image:2

Don't forget to follow the public discussion for a further update since this is an issue with the external docker image.

I hope this helps.

Kind regards,  
Caroline


author: rangerer
body: Got an similar issue since yesterday

![CleanShot 2021-08-19 at 15.31.58.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/156744iB360D18FC6E78F58/image-size/large?v=v2&px=999 "CleanShot 2021-08-19 at 15.31.58.jpg")


author: Vibhanshu Biswas
body: What image do u use to run this pipe?


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
SourceTree - ? - history of the branch selected on the left pane
Asked by d ivanov:

good day

is there any way to view the history of the branch selected on the left pane?

without switching the working copy to this branch?

this is about the history of ___the only that___ branch. not about the place of this branch in a full history.

I'd like to see something like "git log my_branch" shows...

thanx


Answers:
author: stevestreeting
body: This is the subject of a recent feature request: <https://jira.atlassian.com/browse/SRCTREE-1199>
SourceTree (Git) existing local repository pushed to new remote repository
Asked by Michael Probst:

I have a remote git server running Gitolite for version control. I am unable to push to my new remote repositories once I have already created a local working copy. The only way I am able to push to a new remote from my local working copy is to first pull from the remote into an empty directory. When I try to add remotes (after I have a working local copy) it seems to not work. Was able to push my local versions to newly created remote repos when I previously used Gitbox but chose to move to SourceTree due to the additional options and functionality.

I am new to SourceTree, what is the normal workflow to push from the local version to a new remote?

Thank you for your help!


Answers:
author: EddieW
body: Not sure about source tree, but using git on your local repo you can change the remote repo using

```
git remote set-url origin git://my.gitolite.repourl
```

As a rule though you should just clone the remote repo (even if empty) and not create it locally.


Tags: git

pull-request

push

remote
How can I reset the prefixes (/feature, /hotfix, ... ) of git flow
Asked by thomas bader:

I have set some prefixes when I first pressed the gitflow button. I would now like to change these prefixes.


Answers:
author: stevestreeting
body: There are a few caveats around changing the setup after you've started using git-flow, which is why there's no option to change it in ST right now.

If it's just the prefixes (not master or develop) you want to change, it's a little less tricky, unless you already have feature / release / hotfix branches. You should not change the prefixes if you have any of these already.

If you don't, then you can edit the prefixes in the .git/config file inside your repo. Look for the section marked \[gitflow "prefix"\], and modify the values on the right hand side to change them. Make sure you keep the '/' on the end.

comments: author: joostfontein
body: What if all the features / release / hotfixes are 'closed' and removed at a certain point. Can they be changed at that moment?


author: jaimeninolesjimeno
body: You can edit in .git/config when you are using gitflow. May be that helps.


Tags: git-flow
Is there a way to set/remember the default path for patch files?
Asked by farmerpaul:

I am often creating patches from commits in one project (in git repo A) and needing to apply them on another forked project (in git repo B). For various reasons I keep these projects quite separate and do not share remotes between the two, even though they have a similar codebase.

Whenever I want to generate a patch from git repo A, SourceTree picks the root directory of git repo A as the default destination directory for that patch. When I want to apply the patch in git repo B, I have to navigate to git repo A's directory and find the patch there, which takes time. Instead, I'd like both projects to remember my preferred location where I store patch files (usually just some temporary directory that I clean out regularly).

I also don't like how, by default, SourceTree chooses a patch file location that would clutter my repository. I would never actually commit a patch file to my repo, so why does it choose my repo's directory as the default directory for storing such a file? At the very least I think my Desktop folder would be a better choice.


Answers:
author: stevestreeting
body: There isn't an option for this right now, although the drop-down at the top of the browse window should at least remember your recent selections as any Finder open window does, which is a shortcut.

The default is based on my preference, sorry that's not yours ;) I used to run a fairly large open source project and dealt with a lot of patches, many against specific builds or branches which were checked out in different folders. Putting them in the root of the folder they came from was the best organisational approach for me - my ignore files always ignored all .patch and .diff files anyway. The Desktop would be far too general for me, personally, it would get mixed up really fast.

comments: author: farmerpaul
body: Makes sense.

For me, it's just the extra clicks that are a nuisance. It would be a lot nicer if I didn't even have to open a Finder window at all. As I'm getting so used to using SourceTree now, I'm starting to notice the few spots that are still slowing me down. :)

I should probably start taking advantage of the Custom Actions feature of SourceTree - should be able to write a quick script that does just what I want. Cheers!


Tags: default

directory

patch
Does SourceTree support Mercurial purge?
Asked by Jared Scott:

Hello:

After running a manual merge operation, .orig files stay behind in the repository. Is there an option to enable "hg purge" to run after a merge operation to cleanup the repository?

<br />

Thanks,

Jared S.


Answers:
author: stevestreeting
body: Not at the moment, I actually have \*.orig in my hgignore so I never see them and forget they're there, except when I do a bulk cleanup every so often. If it's bothering you you can quickly knock up a Custom Action to do it pretty easily (Preferences \> Custom Actions)

comments: author: Jared Scott
body: Thanks for the quick response! I set up the custom action by doing the following:

1. Enabled the purge extension by adding the following to my .hgrc file

```
[extensions]purge =
```

2. Created the following Custom Action:

Script to run: hg

Paramaters: purge

I bound it to a key and it works as a macro.

I have some suggestions for improvement

1) For custom actions, allow for an evented architecture so i can define when the custom actions run automatically (i.e., after a merge, on commit, etc...)

2) Enable purge as an option

By implementing the former improvement you open up the door to allow users to really extend the usability of the product without adding a lot of code. Hope this helps!