youngmon/atlassian-qna huggingface dataset:
Sending mail from docker image in pipeline
Asked by Jani Ruohomaa:

Hi,

I am pulling down my own docker image from docker hub in bitbucket pipelines and would like to send mail from within the docker image

I am using mail command and everything works fine when running the docker image on my own computer. I am using gmail as the mail provider.

but when I do the same in pipeline it does not work. I don't get any error message or anything so that I would see what is actually wrong

I tried to put the debug logs on on the mail command but I don't get any output in pipeline

on my local laptop (wls2 on windows), I get some debug log output and like said before it works fine

Any ideas what's wrong ?

-Jani


Answers:
author: Oleksandr Kyrdan
body: Hi [@Jani Ruohomaa](/t5/user/viewprofilepage/user-id/131322)

Thank you for your question!

It's a great case for the custom pipe. We have cool and simple guides [How to create a custom pipe](https://bitbucket.org/blog/build-flexible-ci-cd-pipelines-with-custom-pipes) as part of [12 days of CI/CD](https://bitbucket.org/blog/12-days-of-ci-cd) series.

Usage example for your custom pipe could be the next:

```
pipelines:
  default:
    - step:
      script:
       - pipe: docker://your-repository/your-custom_email-image:latest
         variables:
           USERNAME: $USERNAME
           PASSWORD: $PASSWORD
```

<br />

Cheers,  
Oleksandr Kyrdan

comments: author: Oleksandr Kyrdan
body: Also, we have open-sourced [email-notify](https://bitbucket.org/atlassian/email-notify) pipe,  
so you could see how it build or use it just adding the next configuration to your pipeline:

```
scripts:  - pipe: atlassian/email-notify:0.4.3    variables:      USERNAME: 'myemail@example.com'      PASSWORD: $PASSWORD      FROM: 'myemail@example.com'      TO: 'example@example.com'      HOST: 'smtp.gmail.com'
```

Cheers,  
Oleksandr Kyrdan


author: Jani Ruohomaa
body: Thanks for the info, I have tried that email-notify pipe and it works fine but the problem I have is that I am running pmd and I want to send the result in the email body

I couldn't figure out how to expose the result to the email-notify so I decided to do the email sending from within the docker image also

Do you have any idea why the email sending does not work ? It works find if I log into the image and run the analysis and then send the result from my own laptop. In this case the host where the image is run is of course is different than in the pipeline


author: Jani Ruohomaa
body: Does anyone have any luck sending mail from within a docker image ? I am running within the docker image pmd analysis, generating a html file and then sending the result with mail.

This all works fine on my own laptop but not in pipeline. The pmd analysis runs fine but not the mail sending. There are no errors. I tried putting on the debug levels for the mail command but it does not debug anything. When I run the mail command on my laptop within the docker image I get the debug statements.

It seems issuing that mail command within the docker image does not work at all, anyone have any experience with the same ?


Tags: bitbucket-pipelines

docker
Public access to JIRA issues from bitbucket
Asked by serasset:

HI all,

I am a long time user of bitbucket.org forge. Recently, I got myself tempted by the "more with Jira" messages on bitbucket that led me to create a JIRA account and export my bitbucket standard issues into JIRA and connect my bitbucket repository to it.

I, then, went on modifying my issues in JIRA.

Today, I realise that if I'm an anonymous user on bitbucket, I cannot see the "Jira Issues" after selecting the issues tab. "It looks like you don't have permission to access your Jira site."

Is it possible to configure the issue site to allo access to everybody, for reading AND writing issues ?

If not, is there a way to export the Jira issues data and import it into the standard bitbucket issue tracker ?

Regards,


Answers:
author: Eddie Webbinaro
body: I don't think bitbucket issues will allow anonymous WRITE access either does it?  

You can expose anonymous read/browse access in Jira though, and that should solve for browsing. Users that can write in BB will already have an atlassian ID, so they should be able to get auto-access to jira if you enable signup. (update ["allowed domains"](https://support.atlassian.com/user-management/docs/specify-how-users-get-site-access/#Specifyhowusersgetsiteaccess-Approveddomains) in site se4ttings to "all")  

<br />

BUT  

I suspect you're on the **free** 10 user plan, so that would be an issue if you have more than 9 customers. If you have an open source project you can get a OS license for jira standard and support thousands of users.  

<br />

Otherwise, keeping issues in BB is probably a good idea.  

<br />

comments: author: serasset
body: You are right, I was on the free plan. Switched back to BB after export/edit offline/import my issues back to it.

I won't go into the trouble of asking an opensource licence for my basic usage.


Tags: bitbucket-cloud

cloud

jira
Is it possible to use Bitbucket-Cloud Deployment pipeline to deploy to into a on-prem k8's cluster?
Asked by Akshay b:

I have my source code in the cloud version of bitbucket. I am using bitbucket pipelines for build and deploy. I need to deploy to my on-prem cluster. Is this achievable using the cloud version of bitbucket ?


Answers:
author: Justin Thomas
body: [@Akshay b](/t5/user/viewprofilepage/user-id/4025953) You can use a [self-hosted runner](https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Pipelines-Runners-Early-Access/ba-p/1612275) to do a deployment to an on-prem cluster. The Bitbucket Runners is currently in [early access](https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Pipelines-Runners-Early-Access/ba-p/1612275), we are planning to make do an open beta in a couple of weeks. Please join the [early access](https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Pipelines-Runners-Early-Access/ba-p/1612275) program to get access to Bitbucket Pipelines runners.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

deployment
Error 400 raised when trying to upgrade a BitBucket app to data center
Asked by Sebastien Gamby:

My company is currently using BitBucket Server 7.4.4. It is installed on a Windows server with a SQL Server database. All connections between this server and the outside world is filtered by a proxy that performs DPI (intercept HTTPS connections) and prevent connections to any resources except for the Atlassian marketplace.  

I am testing an upgrade from server licenses and some of my apps such as PR-Booster need to be updated to this license type. However when clicking on the "update to data center" button, I get an error with this stack trace below:

POST /rest/plugins/1.0/com.bit-booster.bb-key/license/crossgrade HTTP/1.1" c.a.u.r.r.AppCrossgradeResource Error crossgrading license for com.bit-booster.bb

com.atlassian.upm.mac.HamletException$HttpException: error 400

at com.atlassian.upm.mac.HamletClientPacProxyImpl.getRedirectLocationFromRequest(HamletClientPacProxyImpl.java:211)

at com.atlassian.upm.mac.HamletClientPacProxyImpl.crossgradeAppLicense(HamletClientPacProxyImpl.java:270)

at com.atlassian.upm.rest.resources.AppCrossgradeResource.getLicense(AppCrossgradeResource.java:47)


Answers:
author: Daniel Eads
body: Hi [@Sebastien Gamby](/t5/user/viewprofilepage/user-id/983188) ,

It's possible that Bitbucket Server is trying to contact my.atlassian.com for licensing information. Does your proxy server have a block log that you can check to see which connections are being denied?

If not, I might suggest trying a wildcard allow for \*.atlassian.com while you work through the licensing changes and see if that resolves the 400 error.

Cheers,  
Daniel

comments: author: Sebastien Gamby
body: This is worth a try. I will update the post with the results. I need to go through red tape so it might take a week


Tags: bitbucket-server

server
I am getting an error when importing an repo from bitbucket server to bitbucket cloud
Asked by Praneeth Gujja:

Below is the error that I a receiving while migrating the repository from bitbucket server to bitbucket cloud

1. 13:10:38 git import for: [https://xx.xx.xx.xx:7990/scm/uit/gitflowworkflow.git](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git)
2. 13:10:38 Cloning [https://](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git)[xx.xx.xx.xx](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git)[:7990/scm/uit/gitflowworkflow.git](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git)...
3. 13:10:38 Cloning into bare repository 'pgujja/gitflowworkflow'...
4. 13:10:44 fatal: unable to access '[https://](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git/)[xx.xx.xx.xx](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git)[:7990/scm/uit/gitflowworkflow.git/](https://35.188.143.171:7990/scm/uit/gitflowworkflow.git/)': Received HTTP code 503 from proxy after CONNECT
5. 13:10:44 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.ImportException'\>: Command failed. Return value: 128

Pls help out on this


Answers:
author: Theodora Boudale
body: Hi [@Praneeth Gujja](/t5/user/viewprofilepage/user-id/4219905),

Based on the output, it looks that Bitbucket Cloud is not able to reach your Bitbucket Server instance. If you're using a firewall on your server, I would suggest talking with your network administrator and see if it's possible to whitelist the IP addresses for Bitbucket Cloud, to make the connection possible:

* <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/>

If this is not possible, e.g. due to a company policy, another thing you can do is:

**1.** Create an empty repository in Bitbucket Cloud.  
In the create repository page, make sure you select **No** for the options **Include a README?** and **Include .gitignore?**, so that the repo is empty.

**2.** Take a mirror clone of the Bitbucket Server repo, using the --mirror option in the clone command

```
git clone --mirror <SOURCE-URL>
```

**3.** Then, push that mirror clone to the empty Bitbucket Cloud repo

```
git push --mirror <TARGET-URL>
```

In case your Bitbucket Server repo uses ++Git LFS++, additional steps will be needed. The process for a repo with LFS would be:

**1.** Create an empty repository in Bitbucket Cloud.  
In the create repository page, make sure you select **No** for the options **Include a README?** and **Include .gitignore?**, so that the repo is empty.

**2.** Take a mirror clone of the Bitbucket Server repo, using the --mirror option in the clone command

```
git clone --mirror <SOURCE-URL>
```

**3.** Fetch all LFS objects in your mirror clone, by executing the following command inside the directory of the mirror clone:

```
git lfs fetch origin --all
```

**4.** Then, push that mirror clone to the empty Bitbucket Cloud repo

```
git push --mirror <TARGET-URL>
git lfs push --all <TARGET-URL>
```

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
prompt every time username and password when run git command
Asked by Anuj.pankaj:

I have already set the password for the app on my bitbucket account. Prompt me each and every time when executing git push, git pull, git clone, etc.

When I am using the same command from VScode prompt remote: Invalid username or password.

Please suggest a solution.


Answers:
author: Eddie Webbinaro
body: Git does not have any built in sessions that would persist a password.  

To avoid password prompts when pushing/pulling from the command line you can use [SSH w/ keypair](https://www.atlassian.com/git/tutorials/git-ssh) authentication or a [Git Credential Manager](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage "git supports credential managers to store https passwords.")  

<br />

For VS Code you could also use [our extension that handles this with OAuth dance](https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-vs-code/) between VSCode and BB to then allow push/pull.  


Tags: bitbucket-cloud

cloud
enable outgoing authentication
Asked by Tammy Tang:

Application links have been set up in Bitbucket (7.9) and Jira Server (8.5.1). Jira is showing an error as

*'The local incoming connection uses OAuth, however it's disabled on Bitbucekt.'*

Bitbucket is showing

*'We can't display the status for this application link, because outgoing authentication is disabled. You can enable outgoing authentication to see the status.'*

I cannot find a way to 'enable' outgoing authentication on Bitbucket while all relevant Jira integration plugins on Bitbucket are enabled.


Answers:
author: Ankith Pandey
body: Can someone answer the above issue?


author: maaganti.veeranjaneyulu
body: i have same doubt


Tags: application-link

bitbucket-server

integration

jira

server
Reports API (Code insights) - Sending value type LINK in data array.
Asked by Syed.Naqib:

I am working on adding reports to Pull Request view with [code insights](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) and [reports API](https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bcommit%7D/reports/%7BreportId%7D), however, I hit a snag when I was trying to send some test results reporting and the value type LINK.

I sent following in data array to add report API.

```
{
    "title":  "Detailed Report",
    "value":  "https://example.com/abcd_1234/reports/results?reportId=11223344",
    "type":  "LINK"
}
```

The response error was:

```
{"key": "report-service.general.bad-request", "message": "Value doesn't match expected type LINK", "arguments": {}}
```

I'm curious what format the API is expecting when you're sending a LINK value?


Answers:
author: Eddie Webbinaro
body: LINK is an object that is the 2 parts of link (text,href)

```

{"text": "Link text here", "href": "https://link.to.annotation/in/external/tool"}
```

<br />

(found that in server docs)  

<https://docs.atlassian.com/bitbucket-server/rest/5.15.0/bitbucket-code-insights-rest.html>

comments: author: Syed.Naqib
body: This worked. Thanks a lot. Please don't mind me saying that, but Atlassian/bitbucket API documentation leaves a lot to be desired IMHO.


author: Eddie Webbinaro
body: I don't mind it! I'm glad you did. It's frustrating when things (especially api specs) are left to guess work.

I've actually raised an internal issue to bubble this note up in our cloud docs as well.  

<br />


author: aeirola_terveystalo
body: Would be good to add to the bitbucket cloud documentation at <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bcommit%7D/reports/%7BreportId%7D#put> or <https://support.atlassian.com/bitbucket-cloud/docs/code-insights/>


author: Mikhail Klimenko
body: [@Syed.Naqib](/t5/user/viewprofilepage/user-id/4190842) Could you show your full JSON, please? I'm still trying to make it work but getting the error response all the time:

    {"code": 400, "message": "Unable to process JSON"}


Tags: api

bitbucket-cloud

cloud

code-insight

report
I cant receive email from atlassian
Asked by garsoluciones:

Hi

Hello i'm trying to send invitations to my teammates in my projects but they arent receiving any invitations. There are supposed to have been sent. I don't understand why it doesn't work.

I have checked my spam folder, but it is empty.  

The emails are associated with domain garsoluciones.com

The emails associated are: jaranguren@garsoluciones.com

rgarban@garsoluciones.com

arodriguez@garsoluciones.com  

All of them have a previous account here in bitbucket.


Answers:
author: Theodora Boudale
body: Hi [@garsoluciones](/t5/user/viewprofilepage/user-id/4290628) ,

I checked these 3 emails in our system and I saw a hard bounce event for each one of them with the error message 'Unknown user'.

Were those emails perhaps deactivated for some time? Or was there an issue with your mail server? The hard bounce informs us that the email does not exist and in this case it is placed in a suppression list, as we no longer try to resend to non-existing emails.

I went ahead and removed all emails from the suppression list, could you please try resending the invitations now?

New invitations need to be sent, as the previous ones were dropped.

Please feel free to let me know if things are ok now and if you need anything further.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to manage team of developers to access bitbucket cloud?
Asked by Baztheman:

Hi,

I am migrating from bitbucket server to cloud. It is pretty clear how the user management and licensing work in server version. What about cloud?

Every developers or users need access to repos will need to register to bitbucket.org, then I add those new users to repo access?

Thanks.

Barry


Answers:
author: Theodora Boudale
body: Hi Barry,

There are two ways you can manage user access in Bitbucket Cloud:

++**1. User groups**++

Repos are owned by a workspace. In a workspace's settings, you have the ability to create User groups.

For each User group, you can determine whether you want it to automatically gain access to newly created repos, what type of access, whether it can create new repos in that workspace, and whether it can administer the workspace.

You can then add users in each User group by adding their email in the User group, and each user will receive an email invitation they will need to accept in order to gain access.

If a user doesn't have a Bitbucket Cloud account already, they'll get prompted to create one when they accept the invitation.

If you don't want a certain user group to automatically gain access to newly created repos in the workspace, you can set in the User group **Default repository access: None** , and then manually add the user group to specific repos, from each repo's **Repository settings \> User and group access \>** section**Groups**.

++**2. Direct access to a repo**++

You also have the ability to add a certain user to a specific repo (or repos), without adding them to a User group.

This can be done from each repo's **Repository settings \> User and group access \>** section**Users**.

You can add there the user's email, and an invitation will be sent to them.

Regarding ++**licensing**++ , a license/billing plan is associated with a workspace.  
If you have up to 5 users with access to a workspace's repos, you can make use of the Free plan.  
If you need to give access to more than 5 users, then the pricing is per user and it depends on whether you select the Standard or Premium plan for the workspace.

You can find more details on the billing plan here:

* <https://support.atlassian.com/bitbucket-cloud/docs/manage-your-plan-and-billing/>

If you have any additional questions or need further guidance, please feel free to let me know.

Kind regards,  
Theodora


author: Prakash
body: #### 5 advanced admin controls in Bitbucket Cloud {#toc-hId--569483495}

user management and licensing work in Bitbucket cloud

<https://bitbucket.org/blog/advanced-admin-controls>


Tags: bitbucket-cloud

cloud
How to expand transitions avail in merge pr dialog?
Asked by Perry Moutzouros:

Hello,

I like the potential of this new widget at the bottom of "Merge pull request" dialog on Bitbucket Cloud. There is an information bubble that states not all transitions are available because they require additional user input. In my case. I want to transition a JIRA ticket associated with this PR from "In Progress" to "Start Testing". In Jira (cloud), my workflow defines a simple comment screen that allows developers to enter a comment before transitioning the ticket to "Start Testing".

Do I need to remove this screen in the transition all together to get this new BitBucket "merge pull request" -and- transition issue workflow to automatically work?

I like this shortcut and availability in this Bitbucket dialog. I'd like to use it. In a perfect world, you would simply copy the commit message associate with the PR right into the comment field for my JIRA workflow transition. Or allow me to do the mapping myself. Right? So what are my options currently?

![Screen Shot 2021-03-04 at 10.25.52 AM.png](/t5/image/serverpage/image-id/133014iDC5E7E936BF054D5/image-size/large?v=v2&px=999 "Screen Shot 2021-03-04 at 10.25.52 AM.png")


Answers:
author: Theodora Boudale
body: Hi [@Perry Moutzouros](/t5/user/viewprofilepage/user-id/42960) ,

It's good to hear that you find this functionality useful!

Regarding the transition that doesn't show, I'm afraid that we don't handle transitions that require user input. I can open a feature request for this in our issue tracker if you'd like, please feel free to let me know if you'd like me to do that.

At the moment, the only way for the transition to show would be to remove the requirement for user input.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
I can't receive invitation email
Asked by igor_paula:

Hi!

My team manager invited me to a repository, but I never received the invitation email. I checked into spam and there is nothing there. The email address is correct and he tried resending it multiple times but to no avail.

Can someone help me on this?

Thank you and best regards!


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

I have recently solved this for another colleague at your email domain - there appears to have been a misconfiguration on your company's mail server at some point recently. [You can read the details of the mail server problem on this thread](https://community.atlassian.com/t5/Bitbucket-questions/I-can-t-receive-invitation-email/qaq-p/1627928) .

The pause on your email account has been cleared, and my same advice from the other thread applies. It's likely that an additional attempt to send the invitation email to you should work now, but please let me know if it still doesn't arrive.

Cheers,  
Daniel \| Atlassian Support

comments: author: igor_paula
body: Sorry, I read, but I believe that the problems is not in exchenge server, because I can login using social login via Microsoft account and any repository for me is appearing, nothing in bitbucket, in atlassian, in confluence, all apear to me, less the repositoriees in bitbucket.

When I logout and try recover my password, the system said that my email not exists in database.

How this happens?


author: Daniel Eads
body: Hi Igor,

If I understood correctly, the problem was that you didn't receive the invitation email your team manager sent. The email contains a tokenized link that you need to use to get access. I confirmed from our mail systems that we'd paused delivery of email to your inbox - which matches the problem you mentioned ("he tried resending it multiple times but to no avail.")

Has the team manager tried sending the invitation email again?


author: igor_paula
body: Yes, my manager sent another invitation but not was delivery to me.


author: Daniel Eads
body: If your manager has tried again today or yesterday but the email is still not delivered, please ask your manager to [open a case with us on our support portal](https://support.atlassian.com/contact). There currently are not blocks on your email address from our mail delivery service, so we will need additional details from your manager to continue troubleshooting. Thanks!


Tags: bitbucket-cloud

cloud