youngmon/atlassian-qna huggingface dataset:
Participants are not able to view tickets of a request type with No Issue Security applied
Asked by Johnson Ip:

\[UPDATE\] - Sorry for the confusion. It looks like someone had previously adjusted the Security Level of this particular ticket and had applied a security level that prevents customers from seeing it. So it was behaving as expected.

This issue is like the inverse of what is described here: <https://community.atlassian.com/t5/Jira-Service-Management/Participants-are-not-able-to-view-tickets-when-Issue-Security-is/qaq-p/1730474>

We have configured a request type with ++**no**++ Security level applied to it. The intension was that this request type should be visible to all.

Customer users (Participants) had reported that they can't see the ticket even when the Organisation they are associated with and themselves is added to the request participant field. When they click on the link, they get the giant padlock with the error message of "No Access You do not have permission to view this request. View other portals"

The user can see other request type that have security level set. When I apply a Security Level to this ticket, they gain visibility. It seem that the "Service Project Customer - Portal Access" in defined in the security level is what give the customer access.

Does this mean that a customer can only see tickets that have a security level applied to it?

For Customer, I am referring to those classical customer that is defined under the Jira Service Management area in User Management and not the newer Customer type defined under User section (I haven't had the chance to test these user type)

The strange thing is that, if a user is an agent user, they can see the ticket using the customer view.


Answers:
author: Charlie Misonne
body: Hi!

According to your update you were able to identify the root cause.

You can answer your own question here and mark it as accepted if you want :-)


Tags: cloud

jira-service-management

jira-service-management-cloud
Connected custom email but unable to receive emails.
Asked by Maryam Sanatkaran:

I have successfully connected our Microsoft email however, when we send emails, the task is not created. Any help?


Answers:
author: Jehan Bhathena
body: hi [@Maryam Sanatkaran](/t5/user/viewprofilepage/user-id/5320966) ,

Welcome to the Community!

Please can you share the details of your configuration.

Did you setup the Email request to receive emails in the JSM or did you configure the "Incoming Mail" setting in Jira. Perhaps you can share some screen shots of the setup, this will help in isolating the behavior sooner.


Tags: cloud

jira-service-management

jira-service-management-cloud
How to use cloud API to auto merge PR with merge checks present?
Asked by Pierre Stridsberg:

I'm trying to set a PR that i create from cloud API to "auto merge" when build completes. Is this possible? I know it's possible from the actual page, but i want to do this programatically from my pipeline.


Answers:
author: Theodora Boudale
body: Hi Pierre,

The automatic merging when builds pass works when merging from the UI only, I'm afraid that it is not possible to do this with an API endpoint.

If you'd like, I can create a feature request about providing an API endpoint for this type of merge, for our development team to consider. Please feel free to let me know if you'd like me to proceed with that.

Kind regards,  
Theodora


author: Theodora Boudale
body: Hi Pierre and welcome to the community!

I wanted to give you a heads up that we discovered a bug with "Auto merge" and this feature is not working at the moment.

As soon as the bug is fixed and the feature works as expected, I will check if and how this can work with our API and I'll post an update.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

rest-api
Access keys Pagination bugs
Asked by _sintyasin:

I have a lot of access keys and when it starts to paginate, i cant one next page.

Can someone from bitbucket team check this issue?

Thank you in advance.


Answers:
author: Ben
body: G'day!

Thank you for raising this, I have had another customer reach out to me in the past with the same issue and can confirm that there is a bug in the way that pagination works for access keys.

I have tested this on my end in both Chrome and Firefox and receive the same result, inspecting the developer tools on the page shows that there is no API call or HTTP request made so the pagination is effectively non-functional at the moment.

I have raised a bug ticket accordingly, unfortunately there is no workaround at present however you can "Watch" the ticket for future updates:

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

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Can't see source or commits "Something Went Wrong"
Asked by dougharris:

When trying to view my repository at <https://bitbucket.org/username/repo/src> I get no files and a "Something Went Wrong" error with code: 5dacb2604b3d44fc9f64011f028f0cef

When trying to view commits at <https://bitbucket.org/username/repo/commits> I get no commits and the same "something went wrong" but with code aca9e547c2254ab89909d25462be3b0f

This isn't so helpful. What happened?


Answers:
author: Ben
body: G'day Doug!

My name is Ben and I am from the Bitbucket Cloud Support team.

Allow me to step in for this case as this will require some investigation from the backend and will require sharing sensitive information relating to workspace/repository names which would not be appropriate to discuss on a public forum such as this.

I have opened a ticket in our support portal on your behalf, you should receive an email shortly - we will continue our conversation there.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Someone has already added that SSH key to another account.
Asked by alexd__web:

How can i find the account i have my ssh key added?


Answers:
author: Ben
body: G'day Alex!

My name is Ben and I am from the Bitbucket Cloud Support team.

Allow me to step in for this case as this will require some investigation from the backend and will require sharing sensitive information relating to workspace/repository names which would not be appropriate to discuss on a public forum such as this.

I have opened a ticket in our support portal on your behalf, you should receive an email shortly - we will continue our conversation there.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How can I create a read-only deployment key?
Asked by Pablo Diaz-Gutierrez:

I'm trying to create and use a project-level deployment key with read-only permissions as described in <https://confluence.atlassian.com/bitbucketserver/ssh-access-keys-for-system-use-776639781.html>, but when I try to add keys to either a repository or a project, I'm not given the option to choose permission levels. Is that option gone and the documentation is stale, or do I need to flip some other switch to enable this option?

Here's what I see (compare to the images in the link above):

![Screen Shot 2022-06-08 at 7.18.11 AM.png](/t5/image/serverpage/image-id/201102iADFBC5EC92942AB3/image-size/large?v=v2&px=999 "Screen Shot 2022-06-08 at 7.18.11 AM.png")


Answers:
author: Patrik S
body: Hello [@Pablo Diaz-Gutierrez](/t5/user/viewprofilepage/user-id/1961658) ,

Thank you for reaching out to Atlassian Community.

The documentation you have listed is from Bitbucket server, and from what I could understand you are trying to set up access keys in Bitbucket Cloud.

If that is the case, in Bitbucket Cloud the ssh keys added as Access Keys in both the project and repository levels are already **read-only** , so you will not be presented with the option to choose between read/write, because only **read** permission is available at the moment.

Please allow me to share the access key documentation specifically Bitbucket Cloud:

* Repository level - <https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys/#Step-3.-Add-the-public-key-to-your-repository>
* Project level - <https://support.atlassian.com/bitbucket-cloud/docs/add-an-access-key-to-a-project/#Step-3.-Add-the-public-key-to-your-project>

Hope that helps to clarify your questions! Let me know if you have any doubt.

Thank you, [@Pablo Diaz-Gutierrez](/t5/user/viewprofilepage/user-id/1961658) .

Kind regards,

Patrik S

comments: author: Pablo Diaz-Gutierrez
body: Oh, good catch. That's terrific then, exactly what I needed. Thanks!


author: Patrik S
body: You're very welcome [@Pablo Diaz-Gutierrez](/t5/user/viewprofilepage/user-id/1961658) . Glad to have been of some help :)

Thank you!


Tags: bitbucket-cloud

cloud
Create a Bitbucket Personal Access Token for a service account.
Asked by Collin Willis:

Create a Bitbucket Personal Access Token for a service account. i.e. Can an administrator create a Personal Access Token for an account without logging in with the account and going to the "Profile / Manage account section?

We use SSO and when I connect to Bitbucket it logs me in as me and there's no opportunity to log in with the service account we've created to do some automation that requires access to our BitBucket repositories.


Answers:
author: Patrik S
body: Hello [@Collin Willis](/t5/user/viewprofilepage/user-id/3503741) ,

Thank you for reaching out to Atlassian Community!

I'm afraid it's not possible to create an App Password for another account, even being an administrator of the workspace, as the AppPasswords are located under the personal settings of an account.

In this case, you would have indeed to log in on Bitbucket using the service account e-mail/password and then create the App Password in the service account's personal settings:

* <https://bitbucket.org/account/settings/app-passwords/>

Hope that helps to clarify your questions. Let me know in case you have any doubt.

Thank you, [@Collin Willis](/t5/user/viewprofilepage/user-id/3503741) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
bitbucket runners in a docker instaed of a VM
Asked by Jos? Silva:

Hi, is it possible we define a worker in a docker image instead of a EC2 ?, does it make sense ?

thanks in advance


Answers:
author: Patrik S
body: Hello [@Jos? Silva](/t5/user/viewprofilepage/user-id/4962988) ,

Welcome to Atlassian Community!

As Linux runners already run in a docker container, I'm afraid it wouldn't be possible to add it to a docker image.

However, in case what you are trying to achieve is to execute the runners' container in a container orchestrator like Kubernetes or AWS EKS, it is possible and we have an example of how to set up your pipeline runner in Kubernetes in the documentation below :

* <https://support.atlassian.com/bitbucket-cloud/docs/pipelines-runners-frequently-asked-questions/#How-do-I-setup-Pipelines-Runner-with-Kubernetes>

You are also welcome to take a look at the following article that has more in-depth steps on how to use runners in Kubernetes:

* <https://janosmiko.com/blog/2021-09-08-bitbucket-pipelines-runners-in-k8s/>

Hope that helps! Let me know in case you have any questions.

Thank you, [@Jos? Silva](/t5/user/viewprofilepage/user-id/4962988) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Email Registration - No email
Asked by TW:

Hi

I am trying to add 2 new users to Bitbucket, but neither are receiving the email verification in order to login.


Answers:
author: Ben
body: G'day Tom!

My name is Ben from Bitbucket Cloud Support and I will be stepping in as this will require intervention from the backend.

I have checked your email domain and found 2 users whom were present on our internal suppression list since April 2022 (I will not reveal this domain as this is a public forum) as we received SMTP bounce errors from your mail server:

```
550: 550 No Such Email Exists...??
```

This particular SMTP bounce error is returned when the invitation to the email account is sent before the email account actually exists.

I have since removed those 2 users from our internal suppression list, so you should be able to delete the invitations and re-send them without issue.

We have an existing bug ticket to improve upon this process located here, please feel free to "Watch" this for future updates:  
<https://jira.atlassian.com/browse/BCLOUD-20659>

Let me know how this goes.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How to prevent merge at certain times of the week
Asked by DanielTian:

Hi, I tried to use Conditional merge check to prevent merge after 1 PM on Tuesday but I failed. I wrote the codes below in ScriptRunner and I got a lot of Static type checking errors like **"Script15.groovy: 1: \[Static type checking\] - You tried to call a method which is not allowed: java.util.Calendar#getInstance()"**.

**def cal = Calendar.instance**   
**TimeZone tz = TimeZone.getTimeZone("Asia/Tokyo");**   
**cal.setTimeZone(tz);**   
**def hour = cal.get(Calendar.HOUR_OF_DAY)**   
**Calendar.TUESDAY == cal.get(Calendar.DAY_OF_WEEK)\&\&hour \>= 13**

It seems that Calendar can't be used here and I want to know is there any other way to prevent merge at certain times of the week?


Answers:
author: Yannis Argyropoulos __ScriptRunner - The Adaptavist Group__
body: Hi [@DanielTian](/t5/user/viewprofilepage/user-id/4962305)

Did you try to create this merge check from the project or repository settings screens, instead of the global bitbucket admin screen? You should use the second option as the other screens are accessible to non-admins, and are executed in a more restricted sandbox.

You could log in as an admin, go to the merge checks through the Scriptrunner admin screen (under ../plugins/servlet/scriptrunner/admin/mergechecks), and create a new 'Conditional Merge Check\`, using the 'Projects / repositories' field and paste the same script you provided here. It should work without errors

![Screenshot 2022-09-13 at 17.36.58.png](https://community.atlassian.com/t5/image/serverpage/image-id/215797i23607CD0AF233D46/image-size/large?v=v2&px=999 "Screenshot 2022-09-13 at 17.36.58.png")

![Screenshot 2022-09-13 at 16.44.06.png](https://community.atlassian.com/t5/image/serverpage/image-id/215771iEBCBD5DAD0D283DD/image-size/large?v=v2&px=999 "Screenshot 2022-09-13 at 16.44.06.png")

I hope this helps! Please let us know if you have any questions or any other problems with this.

Kind Regards

Yannis


Tags: bitbucket-server

merge

scriptrunner
How many parallel ssh connections?
Asked by Michael Hohlfeld:

Hi,

in Bitbucket pipeline i use some build scripts for my project. I try to update 17 customer systems parallel \> so i need to open 17 ssh connections in parallel.

9 of 17 ssh connection failed with error message: "*ssh: connect to host XXXX.my-server.com port 222: Network is unreachable*"

After they failed i can "rerun the failed" to update all other failed customer systems... but this manually thing is not the solution.

**Question**: Is there a limitation for outgoing parallel ssh connections in Atlassian/Bitbucket/Pipeline?

Michael


Answers:
author: Patrik S
body: Hello [@Michael Hohlfeld](/t5/user/viewprofilepage/user-id/3861209) ,

Thank you for reaching out to Atlassian Support.

There shouldn't be a limitation on the number of the parallel SSH connection. As the error being returned is "*Network is unreachable*", I think there's a possibility of the destination server's firewall to be blocking the connection from pipelines. Do you have one pipeline step for each of the ssh connections, or do you run all of the connections at a single step? I ask this because different steps might be assigned different IP addresses from our IP ranges, so I would suggest making sure you have the all following IP addresses whitelisted in the firewall of all your customer's systems:

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

Also, I would recommend trying to run it locally in a docker container, and see if you can reproduce the issue. To run it locally in a docker container and simulate a similar environment as pipelines you can follow the instructions outlined in the below documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/debug-pipelines-locally-with-docker/>

Hope that helps! Let me know in case you have any questions.

Thank you, [@Michael Hohlfeld](/t5/user/viewprofilepage/user-id/3861209) .

Kind regards,

Patrik S

comments: author: Michael Hohlfeld
body: Hi Patrik,

regarding your question ?*Do you have one pipeline step for each of the ssh connections, or do you run all of the connections at a single step?*"

I run all of the connections at a single step and also increased the number of parallel incoming ssh connections on the customer system, but without success.  

What works finally for me: Split the 17 parallel ssh connections from 1 step to 4 steps with 5+5+5+2 parallel ssh connections.

Pipeline time before: 2min

Pipeline time after: 6 min

Maybe your firewall thing will work, but my solution works great for me.

That the deployment needs now 6 instead of 2 min is totally fine for me.

Thanks and all the best

Michael


author: Patrik S
body: Hello [@Michael Hohlfeld](/t5/user/viewprofilepage/user-id/3861209) ,

Awesome! Thank you for sharing the solution that you have used :)

Kind regards,

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Bitbucket CI/CD vs Remote Server
Asked by Arthur Harutyunyan:

Hey Community !!

Im new in Bitbucket Pipelines, now want to setup a simple pipeline to deploy my code to the remote server. What I did:

1. I dont have root permission on my remote server, and connecting with username@host
2. Generated ssh-keys, added the .pub one to the repo "Access Keys"
3. Generated ssh-key pairs in repository settings, and added the public one to my authorized keys

There are 2 issues Im facing right now:

1. When trying to fetch the fingerprint of the remote host, getting "*Unable to fetch fingerprints, check host SSH connection and try again*". Here Im passing the IP address
2. And my pipeline just does not work, this is probably because of 1)

And this is my .ym file:  
pipelines:  
default:  
- step:  
name: Deploy to production  
deployment: production  
script:  
- echo "Deploying to staging environment"  
- pipe: atlassian/ssh-run:0.2.2  
variables:  
SSH_USER: 'myuser'  
SERVER: 'xx.yy.zz.qq'  
COMMAND: touch /home/myuser/file.txt  
Just trying to create a file in my home directory

Can you please help me to figure out what Im doing wrong here, and how can I fix the issue. I could not find any useful info to fix the issue

Thanks,

Arthur


Answers:
author: Patrik S
body: Hello [@Arthur Harutyunyan](/t5/user/viewprofilepage/user-id/511415) ,

Thank you for reaching out to Atlassian Community.

The fetch fingerprint usually fails when bitbucket is being blocked to access your server because of a firewall.

In this case, could you please make sure that :

* Your server IP address is accessible from the internet
* You have whitelisted all the below IPs in your firewall :  
  <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/>
* Port 22 is opened in your ssh server, so bitbucket can connect to it.

You can also execute the below commands both locally and in the pipelines to check if there's any connection issue between the pipelines infrastructure and your ssh host :

```
nmap -v -Pn <IP ADDRESS of the host> -p 22
ssh-keyscan -t rsa <IP ADDRESS of the host>
```

Hope that helps! Let me know in case you have any questions or run into any issues.

Thank you, [@Arthur Harutyunyan](/t5/user/viewprofilepage/user-id/511415) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Can you please clear all my sessions? I cannot resolve CAPTCA in Sourcetree...
Asked by Emanuel Balaban:

I am getting this error that I have to logout and login to resolve a CAPTCA before doing anything else in Sourcetree:  

fatal: remote error: CAPTCHA required  
Your Bitbucket account has been locked. To unlock it and log in again you must  
solve a CAPTCHA. This is typically caused by too many attempts to login with an  
incorrect password. The account lock prevents your SCM client from accessing  
Bitbucket and its mirrors until it is solved, even if you enter your password  
correctly.

If you are currently logged in to Bitbucket via a browser you may need to  
logout and then log back in in order to solve the CAPTCHA.

Visit Bitbucket at <https://www.code.dtf.lighting.com> for more details.


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

The session clearing is not done on the Bitbucket side, you can do it with your browser.

Close Sourcetree, then visit the URL given in your browser. You will be asked to log in and solve a Captcha. (You may already have a session running in the browser already, in which case, you can either log out of it and refresh, or use the browser's "incognito" mode, or a different browser)


Tags: bitbucket-cloud

cloud
Setting variables from within pipeline step
Asked by Andrei Dascalu:

Hello,

I have the following use case for bitbucket pipelines:

- i am building tags using a convention glob pattern, like "v?.?-\*"

- my build scripts need to extract the first part as well as the second part of the glob (eg: the "?.?" as well as the "\*")

I'm not sure if Pipelines provides a way to extract glob patterns as provided into variables available at run time, however I can do that manually via "sed". In thise case though, I would like to execute an initial step that performs splitting the current tag into its components and setting them into variables to be available for the following steps.

I know that Github actions allows one to set variables at runtime in a step so that they are available to subsequent steps. How can this be done with pipelines?

thanks


Answers:
author: Theodora Boudale
body: Hi Andrei and welcome to the community!

It is possible to set variables at runtime for custom pipelines only. The variables you set for a custom pipeline will be available for all steps of that pipeline.

You can see an example in our documentation:

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#variables>

The custom pipeline in the example has only one step, but its variables will be available to any other steps you add to that pipeline.

Custom pipelines do not run automatically, they can only be triggered manually or scheduled from the Bitbucket Cloud interface.

If you don't want to use custom pipelines and you use ones running e.g. on tags, then you can pass variables from one step to the next one as follows:

In the first step, save these variables in an env file and define this file as an artifact:

```
- step:
    script:
      - echo export BuildTag="v1.2-1" > build.env
    artifacts:
      - build.env
```

In the next step, you can source this file using a command like the following:

```
- source build.env
```

and then you'll be able to use any variables you have defined in that file. With this solution you cannot provide the value of the variable at runtime before the build starts, this is going to work only if you can determine the value programmatically in the script and then assign it to the variable.

We have a feature request to allow users to define variables that can be shared across all steps in the yml file:

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

You can vote for that feature request if it's something you'd be interested in and add yourself as a watcher if you'd like to get notified via email on updates.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud