youngmon/atlassian-qna huggingface dataset:
I have a repository for a python project , but could not get the checkstyle report
Asked by Robert James:

I have a python repository.

I am going to apply synk for it using yml

This is my yml

image: python:3.7

pipelines:  
default:  
- step:  
name: Testing  
caches: # Marks what will be in cache so it is not downloaded again.  
- pip  
script:  
- pipe: snyk/snyk-scan:0.5.2  
variables:  
SNYK_TOKEN: $SNYK_TOKEN  
LANGUAGE: "python"  
CODE_INSIGHTS_RESULTS: "true"  
SEVERITY_THRESHOLD: "high"  
DONT_BREAK_BUILD: "true"  
MONITOR: "false"  
after-script:  
- pipe: atlassian/checkstyle-report:0.3.1  
variables:  
REPORT_FAIL_SEVERITY: 'error'  
CHECKSTYLE_REPORT_TITLE: 'my-report'

But this gave empty report

Can you help me?


Answers:
author: Igor Stoyanov
body: [@Robert James](/t5/user/viewprofilepage/user-id/4994742) hi. Thanks for your question.  

For checkstyle report for python project please check[this guide.](https://thomaspoignant.medium.com/create-checkstyle-report-for-python-fe4e62505983)  

Regards, Igor


Tags: bitbucket-cloud

cloud

report
List Repositories in a group using REST API
Asked by Shahid Badusha:

How to get the list of repositories in bitbucket group using rest API..?


Answers:
author: Syahrul
body: Hi [@Shahid Badusha](/t5/user/viewprofilepage/user-id/4757098)

Welcome to the community!

I suggest you check our [API documentation](https://developer.atlassian.com/cloud/bitbucket/rest/) to find any available API you can use in the Bitbucket cloud.

That said, if you wish to get the list of repositories in a Workspace, you can use the following [List of repositories in a Workspace endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get) for example:

```
CURLcurl -X GET -u username:password "https://api.bitbucket.org/2.0/repositories/<workspace-ID>/?pagelen=10"
```

The above curl commands will return all repositories listed for your workspace.

Hope this helps

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Why I cannot see the SSH keys button on Atlassian account page (or Personal Settings page)?
Asked by James Cai:

The SSH Keys button on the Atlassian account page is missing. Wonder what caused that. Thanks.


Answers:
author: Jimmy Seddon
body: Hi [@James Cai](/t5/user/viewprofilepage/user-id/3616835),

I know Atlassian has been making some updates to the UI recently. If you click on your avatar in the top right corner and click on "Personal Settings" in the drop down menu. You can find SSH keys in the left hand menu under the security heading.

I hope that helps you find what you are looking for.

-Jimmy

comments: author: James Cai
body: That is exactly what I did. Here is the screen I see

![Screenshot 2022-07-29 103551.png](https://community.atlassian.com/t5/image/serverpage/image-id/208653i4FB47887F6C1C3A6/image-size/large?v=v2&px=999 "Screenshot 2022-07-29 103551.png")

Then I click on the hyperlink "profile settings page" I got the following -

![Screenshot 2022-07-29 103612.png](https://community.atlassian.com/t5/image/serverpage/image-id/208654iF1DF24C16C1F6365/image-size/large?v=v2&px=999 "Screenshot 2022-07-29 103612.png")

"SSH Keys" is not in the list as you can see. Cannot figure out why it is not there.


Tags: bitbucket-cloud

cloud
Cant push again after deleting PR
Asked by piyush.pandey:

Hello, I had to delete a PR that had commits from my local branch, but after deleting it how can I raise another PR for the same changes. I can't push as it needs new commits.  
If anything is unclear let me know in the comments.


Answers:
author: Christian Glockner
body: Hi Piyush,

As long as the source branch differs from the target branch you should be able to create a PR from the UI by selecting the source and target branches.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

server
How do I use a HTTP access token in a .netrc file
Asked by bob bobbens:

I created a HTTP access token in the Project settings and I would like to use the token in a .netrc file in a Ubuntu machine. Is this possible and how do I enter the information in to the .netrc file if it is possible?


Answers:
author: Brian Hewson
body: If you've created a token before January 2023:  

*** ** * ** ***

```

echo "" > ~/.netrc-for-atlassian
chmod 600 ~/.netrc-for-atlassian
echo "machine <myhost>.atlassian.net login <my.name@email.address> password <64-bit token" >> ~/.netrc-for-atlassian

curl -n ~/.netrc-for-atlassian https://<myhost>.atlassian.net/rest/api/3/issue/<MY-ISSUE>
```

*** ** * ** ***

This has been working for me to great effect, however they've recently changed the api-token to a SIGNIFICANTLY longer string and every attempt to use the new api-token results in an error message  
So curl or netrc is somehow broken with the new implementation, so I was looking to ask this exact question, but for newer tokens...  

comments: author: Brian Hewson
body: After reading man netrc I figured it out:  
This method will work for 256-bit api tokens generated after January 2023

```
echo "" > ~/.netrc-for-atlassian
chmod 600 ~/.netrc-for-atlassian
echo "machine <myhost>.atlassian.net login <my.name@email.address> account <64-bit token" >> ~/.netrc-for-atlassian

curl -n ~/.netrc-for-atlassian https://<myhost>.atlassian.net/rest/api/3/issue/<MY-ISSUE>
```

That's it, now it works


Tags: access

bitbucket-server

http

server
How to authentice with app password via Python requests?
Asked by Felipe Peter:

I want to use Sphinx linkcheck to check the documentation of Python projects for dead links. Some links point to stuff on Bitbucket and I need to provide credentials to see if those links are still alive. [The sphinx documentation](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_auth) explains how to add credentials but I am struggling to get them to work. The following minimal example always yields a response telling me that Bitbucket does not support account passwords anymore, although I am using an app password.  
import requests

response = requests.get(  
"<https://bitbucket.org/organization_name/repo_name>",  
auth=("my_email", "my_app_pasword"),  
)  
What credentials do I have to pass to the requests library to access that link?


Answers:
author: Patrik S
body: Hello Felipe,

Welcome to Atlassian Community!

I'm not really sure about the python syntax for that library, but looking at the example you shared, it seems like you are using the e-mail address as the username, and this is likely the reason why you are facing the authentication error.

To use basic authentication in calls to Bitbucket API you need to provide :

* username : the bitbucket username of your account (not the e-mail address). You can check the username by going to your account's [personal settings.](https://bitbucket.org/account/settings/)
* app password: a valid app password with the required permissions. The permissions necessary depend on the endpoint being called and are listed in the [API documentation](https://developer.atlassian.com/cloud/bitbucket/rest/).

So in this case, you can try replacing the e-mail address with your bitbucket username and try executing the script again.

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

Thank you, [@Felipe Peter](/t5/user/viewprofilepage/user-id/4994108) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Repository is over the size limit (4 GB) and will not accept further additions.
Asked by soma rani:

Repository is over the size limit (4 GB) and will not accept further additions. increase 2 gb more


Answers:
author: soma rani
body: re\*\*\*\*ate-de\*\*\*r (branch v1 and v13)

\<Removed image due to private content\>

<br />

remote: Repository is over the size limit (4 GB) and will not accept further additions.

need help me

comments: author: Patrik S
body: Hello [@soma rani](/t5/user/viewprofilepage/user-id/4915596) ,

Thank you for reaching out to Atlassian Community!

I've managed to run GC in the repository you shared, and its size was reduced to 1.3GB!

Also, now that GC is completed, I would highly recommend you to remove any old copies of the repository and doing a fresh clone of it. Since the old clones have a dirty history, it's better to delete them, so you don't risk pushing the dangling objects back into your cleaned repository, which would increase its size again.

Would you please confirm if everything looks good on your end now?

Let me know if you have any questions.

Thank you, [@soma rani](/t5/user/viewprofilepage/user-id/4915596) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
License issue
Asked by IT_RD:

Hi Team,

We have Bitbucket installed on one of our servers. Recently, we renewed the license "SEN-16947680", and its support is valid till 15 May 2023.

When I check the Bitbucket license on our server, it is still on the old one that was expired already

Our server ID is: Server ID**BEQ1-6KL3-37ZV-Y9TF**

The SEN installed is **"SEN-10498421".**This is the old license.

I have 2 requests if you please:

* Update the license on our server to have the new active one. I do not know how to do that.

* I need to update Bitbucket to the latest version. Because we received an email saying that there are vulnerabilities on the current version we have now.

  * Can you please let me know how to upgrade the version to the latest one?

Please, let me know if there are any missing details you need for these requests.

Regards,

Mina


Answers:
author: Christian Glockner
body: Hi Mina,

You can find instructions on how to update your license key at <https://confluence.atlassian.com/bitbucketserver076/updating-your-bitbucket-server-license-details-1026535501.html>.

As for the upgrade, the upgrade guide is at <https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html>, but this for version 8.2. Make sure you select the right version from the dropdown at the top right that's applicable to you.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

server
A proper merge commit....how to do within a PR?
Asked by David V_ Corbin:

How to do TRUE merge as part of a PR (meaning a new merge commit that has 2 - or more parents). Not a FF (that makes it look like work was done "on" the target branch); not a Squash (that eliminates the history)....


Answers:
author: Patrik S
body: Hello [@David V_ Corbin](/t5/user/viewprofilepage/user-id/4613778) ,

Thank you for reaching out to Atlassian Community.

When you click the "Merge" button in a pull request, a new panel will be displayed with an option to choose which [merge strategy](https://support.atlassian.com/bitbucket-cloud/docs/merge-a-pull-request/#Merge-strategies) you'd like to use :

![Screen Shot 2022-08-02 at 18.01.19.png](https://community.atlassian.com/t5/image/serverpage/image-id/209137i7F5C1EF7D0F77502/image-dimensions/374x166?v=v2 "Screen Shot 2022-08-02 at 18.01.19.png")

The currently available option are **Merge commit** , **squad,** or **Fast forward** . Accordingly to your description, the option that would create a new commit with two parents would be **Merge commit**.

You can also set the default merge strategy in a given repository by going to ***Repository Settings \> Merge Strategies***.

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

Thank you, [@David V_ Corbin](/t5/user/viewprofilepage/user-id/4613778) .

Kind regards,

Patrik S


author: Ulrich Kuhnhardt _IzymesCo_
body: Hello David,

to override the merge-commit message Bitbucket creates you can trigger a PR merge via the Bitbucket cloud rest api <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-merge-post> and define the merge message via the 'message' request parameter.

Hope that helps

Ulrich

// [Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd)


Tags: bitbucket-cloud

cloud
Permission denied at System.Diagnostics.Process.ForkAndExecProcess - Bitbucket pipeline
Asked by Luis Castro:

Hi all,  

I am getting this error whilst trying to start WinAppDriver.exe when running bitbuckets pipeline. Does anyone know how I ensure it runs as admin when running via bitbuckets pipeline?  

System.ComponentModel.Win32Exception : Permission denied at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(String fileName)  

Thank you,


Answers:
author: Patrik S
body: Hello [@Luis Castro](/t5/user/viewprofilepage/user-id/4992266) ,

Welcome to Atlassian Community.

The application you are trying to execute seems to be a Windows executable. In this case, could you please confirm if you are using [bitbucket windows runners](https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/) ?

If yes, you could open the PowerShell windows as an Administrator and then execute the /start.ps1 script to start the runner from that admin PowerShell session.

Also, make sure you have met all the pre-requisites to use windows runners outlined in the below documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/#Prerequisites>

If that does not work, please share your bitbucket-pipelines.yml file with us so we can take a deeper look.

Thank you, [@Luis Castro](/t5/user/viewprofilepage/user-id/4992266) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
BITBUCKET_BRANCH Variable in Custom Pipelines
Asked by Scott Nickless:

Hi All,

Can anyone confirm if the BITBUCKET_BRANCH works in custom pipelines? I just tried it and it worked in the feature branch that I'm working on, but the documentation [here](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/) says it's not available in Custom Pipelines. Something that may make a difference is I'm using Deployment environments in my pipelines, so not sure if that allows it to work?  

Basically, I'm after Atlassian to say it's supported in custom pipelines, or the community to say that you use it and it works. Just looking for that reassurance before putting it into production.

I should mention that any articles I've found on this question are 4 or 5 years old, so I'm looking for a more up to date answer.

Thank you


Answers:
author: Patrik S
body: Hello [@Scott Nickless](/t5/user/viewprofilepage/user-id/3854174) ,

Thank you for reaching out to Atlassian Support.

It depends on how you trigger the custom pipeline. If you trigger it from the *Pipelines page \> Run pipeline* , where a panel will show up and you have to select the *branch* for which the pipeline will run, then yes, the value of $BITBUCKET_BRANCH will be available in the build.

However, if you trigger the pipelines by directly accessing a commit from the Commits page, and then clicking on *Run pipeline* option on the left side of the page, the build will be triggered specifically for that commit and with no reference to a branch, so $BITBUCKET_BRANCH will be empty within the build steps.

Hope that helps to clarify your questions.

Thank you, [@Scott Nickless](/t5/user/viewprofilepage/user-id/3854174) .

Kind regards,

Patrik S.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Bitbucket API list group members pagination
Asked by Admin acme-deepcred:

Hello, I'm trying to list members of a group using the API.

I am aware that API v2 doesn't support that so I'm using the API v1.

<https://support.atlassian.com/bitbucket-cloud/docs/groups-endpoint/>

I didn't find anything regarding pagination, how can I list large group's members?


Answers:
author: Patrik S
body: Hello [@Admin acme-deepcred](/t5/user/viewprofilepage/user-id/4993259) ,

Thank you for reaching out to Community.

The Bitbucket 1.0 API endpoints, including the ***groups*** endpoint, do not support pagination and all the results for the API call will be returned in a single request.

Our development team is actively working on implementing the equivalent ***groups*** endpoint into the 2.0 API, which will then fully support pagination. You can check the feature request in the below link :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@Admin acme-deepcred](/t5/user/viewprofilepage/user-id/4993259) .

Kind regards,

Patrik S

comments: author: Pramodh M
body: Thank you [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)


author: Pramodh M
body: Hi [@Admin acme-deepcred](/t5/user/viewprofilepage/user-id/4993259)

Have you checked with pagelen and page parameters?

<https://developer.atlassian.com/cloud/bitbucket/rest/intro/#pagination>

Thanks,  
Pramodh

comments: author: Admin acme-deepcred
body: Hi thanks for the answer!  
Yes I have, these parameters don't seem to work with v1


author: Pramodh M
body: Hi [@Admin acme-deepcred](/t5/user/viewprofilepage/user-id/4993259)

Can you check with the header information as described here and see if you get more information

<https://support.atlassian.com/bitbucket-cloud/docs/use-bitbucket-rest-api-version-1/>

Thanks,  
Pramodh


author: Admin acme-deepcred
body: Unfortunately I couldn't find anything related to pagination in the HTTP headers


Tags: bitbucket-cloud

cloud
how to setup app password in bitbucket
Asked by Taleh Mammadli:

in order not to retype the password every time


Answers:
author: Syahrul
body: Hey [@Taleh Mammadli](/t5/user/viewprofilepage/user-id/4993011)

Welcome to the community!

I assume you are using git CLI and wish to store your credentials so that you don't have to keep re-typing it?

If yes, as per the discussion [here,](https://stackoverflow.com/questions/35942754/how-can-i-save-username-and-password-in-git) you can use git credential helper to store your password.

:warning: Do note that these steps will save your credentials in **Plaintext**.

Run

    git config --global credential.helper store

then

    git pull

You will then ask to provide your username and password, which will store under `~/.git-credentials`

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
How can I disassociate a repo with SourceTree without deleting it from the disk?
Asked by Tuana Celik:

Somehow, I've created a new repo on sourcetree which is an existing local folder that I cannot afford to lose. I have not commited anything so it's just sitting there with all my other sub folders/files waiting to be commited. I want to 'delete the repo from SourceTree/Git' without deleting it from the disk. Disassociate it with git entirely. Any idea how I can do this?


Answers:
author: Ana Retamal
body: Hi Tuana, when you right click on the repo you have the option to delete it. Then you can choose to only delete the bookmark, or to completely remove this repository from your disk (see screenshot).

![Screen Shot 2017-06-21 at 13.56.04.png](https://community.atlassian.com/t5/image/serverpage/image-id/2363iBB0A31147901E1D9/image-dimensions/442x156?v=v2 "Screen Shot 2017-06-21 at 13.56.04.png")

Make sure to delete **just** the bookmark.

Let us know if you have any questions!

Cheers,

Ana

comments: author: Tuana Celik
body: Hi Ana,

Thank you very much, all is good now :)


author: Ana Retamal
body: Glad I could help you, Tuana :)


Tags: mac
Unable to update or reinstall sourcetree
Asked by Arun Ganesan:

I am using MacOSSierra 10.2.5. i uninstalled all older versions of source tree and trying to install source tree 2.5.2. When i install/open, i am getting error as "The source tree application you are running is less than the current version required. Please work to move to SourceTree version 2.5.1+. My OS still has reference to old version it seems, please let me know how to install the latest version?


Answers:
author: Manju
body: SourceTree vesion 2.5.3 is available foe download from this link - [direct download](https://bitbucket.org/atlassianlabs/sourcetree-betas/downloads/OSX_Latest.zip)

Before you download this, make sure to remove your existing copy of sourcetree from all locations.

Navigate to \~/Library/Appliaction Support/, then locate and delete SourceTree folder

Navigate to \~/Library/Preferences. Then locate and remove com.torusknot.SourceTreeNotMAS.plist

You can try installing the new build after the above steps.

Hope that helps.

comments: author: Arun Ganesan
body: Thanks Manjunath, I deleted the SourceTreeNotMAS.plist and all existing copies. But it still gives me same error while installing/opening 2.5.3. Do you know somewhere else i should check and delete the old source tree reference ?


Tags: mac
I can not clone the warehouse!
Asked by Lysh:

![20170621093949.png](/t5/image/serverpage/image-id/2348i9D96F8DDAE643549/image-size/large?v=v2&px=999 "20170621093949.png")

I do not know what to do. Please help me.


Answers:
author: Ana Retamal
body: Hi Lysh! Can you open SourceTree and go to the Git settings? There, if you're using the embedded version, switch to 'System Git' and then switch back to 'Embedded Git', this seemed to fix the template warning for some users. You can find their responses at [About Git path for SourceTree](https://community.atlassian.com/t5/Git-questions/About-git-path-for-Sourcetree/qaq-p/186483).

If you're still having trouble cloning the repo, please provide the follwoing information:

* Which version of SourceTree and OS are you using?
* Are you getting the same error if you clone the repo via the command line?
* Is this happening with a specific repo or with all of them?

Best regards,

Ana

comments: author: Lysh
body: I am sorry to reply to you so late, I am using the "system Git". When I switch back to "embedded Git", the same will happen.

![??20170622115730.png](https://community.atlassian.com/t5/image/serverpage/image-id/2388iBD1426A47311EF71/image-size/large?v=v2&px=999 "??20170622115730.png")My sourceTree version is 2.1.2.5, my operating system is Windows10.


author: Ana Retamal
body: Hi Lysh,

Can you send us the SourceTree log? You can find it at *C:\\Users\\\<username\>\\AppData\\Local\\Atlassian\\SourceTree\\sourcetree.log*

Please provide answer to the following too:

* Are you getting the same error if you clone the repo via the command line?
* Are you cloning via SSH or HTTPS?
* Is this happening with a specific repo or with all of them?

Cheers,

Ana


author: Lysh
body: Well, when I put SourceTree into a low version, the clone was successful


author: Ana Retamal
body: Hi Lysh, I'm glad you got it to work :) Were you able to upgrade and keep it working?

Best regards,

Ana
Why sourcetree become the same type of a-hole as google chrome?
Asked by V:

I'm just curious, who was behind the decision don't let user decide where to install the software?

Thanks for free software, but no thanks for v2.

Staying with 1.9 forever.


Answers:
author: Ana Retamal
body: Hi! We have a feature request at [SRCTREEWIN-7168](https://jira.atlassian.com/browse/SRCTREEWIN-7168) to allow users to change the location of SourceTree. You can vote for it, write a comment or watch the ticket for updates.

Best regards :)

Ana