youngmon/atlassian-qna huggingface dataset:
BitBucket API to get Latest Tag on a particular branch
Asked by deepika dua:

I want to get the latest tag on a particular branch.

For Example,

for a branch release/fix, there are n commits, but for each commit tags are not generated.

release/fix- commit #111

commit #110 - tag- 1.1.1

commit # 109 - tag 1.1.0

commit # 108

So, latest tag would be 1.1.1 for branch release/fix.

Need to get this via bitbucket api.

I want to get latest tag on branch release/fix.


Answers:
author: Syahrul
body: G'day, [@deepika dua](/t5/user/viewprofilepage/user-id/5462980)

Welcome to the community.

You can get this information via the [List tags](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-refs/#api-repositories-workspace-repo-slug-refs-tags-get) endpoint and use sorting to sort them for the latest created tags. You can check our page below to understand how to use sorting.

[Sorting](https://developer.atlassian.com/cloud/bitbucket/rest/intro/#supported-endpoints)

For example:

```
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/refs/tags?sort=-date
```

Regards,  
Syahrul

comments: author: ccenvcvb
body: I think the branch parameter is missing from this API, or can you use sorting to select the tags on a particular branch ?

I'm also interested in this question, on this risk of hijacking the OP's question I'd like to be able to get the result of \`git describe\` for a particular branch.


author: Theodora Boudale
body: Hi [@deepika dua](/t5/user/viewprofilepage/user-id/5462980) and [@ccenvcvb](/t5/user/viewprofilepage/user-id/735045),

I'm afraid that it is not possible to get that info via API, as our API doesn't return the branches that contain a certain commit or the result of \`git describe\` for a particular branch.

I can create a feature request for an API endpoint that returns the equivalent of \`git describe\` for a particular branch, for our development team to consider. Please feel free to let me know if you'd like me to do that.

Kind regards,  
Theodora


author: ccenvcvb
body: \> Please feel free to let me know if you'd like me to do that.

Yes please, I'd appreciate that.


author: Syahrul
body: Hey [@ccenvcvb](/t5/user/viewprofilepage/user-id/735045)

I have raised a feature request on behalf of you at:

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

Please don't forget to Vote and Watch them so that you'll receive an update if it's being considered.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Don't receive invitation to gmail domain
Asked by reio:

Hello, I cannot send an invitation to this email

\<email_redacted\>

But did receive it instantly to new email in my domain \<domain\>

Please help


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

The emails we have sent to the Gmail address were bounced because the email address does not exist. This is the error in our logs:
> 550-5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. For more information, go to <https://support.google.com/mail/?p=NoSuchUser>

You can also verify it if you:

1. Open Gmail via <https://www.google.com/gmail/about/>
2. Select **Sign in** from the top right corner
3. If you enter the email you provided us and select **Next** , you will see the message **Couldn't find your Google account**

Please double-check the email you are inviting for any typos and/or ask the user who provided you with this email to double-check for any typos. If there are no typos and this is the email you want to send the invitation to, then the user will need to create a Gmail account with this email first, and then you can invite them. In this case, please let me know after the user creates the email account so that I remove the email address from our suppression list and you can resend the invitation afterwards.

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

Just a heads up, I removed the email address and domain name from your post for privacy reasons.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Unable to clone a repository I'm invited to - won't accept my credential and asks for user name
Asked by Wayne Richard Bennett:

I know my credentails are correct. But a window opens up asking for my user name. I looked in my account to find my user name but only found a public and a private name - not sure where to find my user name.

After executing the git clone command (with the correct URL) a window is displayed asking for my user name. The cloning fails at this point.


Answers:
author: Ben
body: G'day!

The most common issue customers are experiencing related to authentication is due to the deprecation of GIT username/password in favour of App Passwords on 01/03/2022:  
<https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231>

You will need to make use of an AppPassword for communicating to GIT via HTTPS.  
We have documentation for usage of app passwords at the following link:  
<https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/#Create-an-app-password>

<br />

Essentially, when connecting via HTTPS you will use your AppPassword alongside your username seperated with a ":" character.

Therefore if you are authenticating to GIT over HTTPS to push/pull you will need to update your remote URL's to include the App Password:

```
git remote set-url origin https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git

```

The same applies when performing git clone:

```
git clone https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git

```

I would suggest ensuring also that all stored passwords related to authentication over GIT are cleared from your machine (ie Credential Manager for Windows, Access Keychain for Mac or /etc/shadow folder for Linux).

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
create a service account
Asked by Rahulsingh Pratapsingh Pardeshi:

hi Team,

we have a Bitbucket instance on data center. want to create a service account for a bitbucket project can you please guide.


Answers:
author: Kseniia Trushnikova
body: Hi [@Rahulsingh Pratapsingh Pardeshi](/t5/user/viewprofilepage/user-id/5462593),

A service account is a user for Bitbucket, so you'll need to create it the same way as other user accounts: <https://confluence.atlassian.com/bitbucketserver/users-and-groups-776640439.html>


Tags: bitbucket-data-center

data-center
Repo access after switching from windows to mac: set up ssh in personal settings but asked for pw
Asked by Rhea Malviya:

Hi there,

We are in the middle of a tech transition after switching from Windows PC to Mac. I was setting up my bitbucket access with personal ssh keys and i was able to clone repos from my workspace. However, when it come to pushing, i'm being asked to input my password through Keychain access. I have never run into this issue previously with these repos in which I'm repeatedly asked for my pw even after setting up SSH. I also tried inputting my bitbucket pw into keychain and it didn't work. Can anyone give any suggestions for how to solve this?

Thanks in advance.


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

If the password prompt comes from Keychain Access, then the password you need to enter is that of your Mac user account. SSH keys are not stored in the Keychain, but if your SSH key pair has a passphrase, that passphrase may be stored in Keychain and the SSH agent on your Mac can be configured to use the Keychain.

The protocol (HTTPS or SSH) used when cloning or pushing to a repo is determined by the remote URL you are using. You can navigate to the directory of the repo's clone from a terminal on your Mac and run the command **git remote -v** . Do all the URLs in the output start with **git@bitbucket.org** or is there any URL starting with **https**?

Did you set a passphrase for the SSH key pair that you use in Bitbucket Cloud, when you generated this key pair?

Does the ssh config file on your Mac have the option **UseKeychain yes** for **Host \*** or **Host bitbucket.org**? See for reference:

* <https://developer.apple.com/library/archive/technotes/tn2449/_index.html>

The default location of a user-specific ssh config file is in **\~/.ssh/config** , whereas the system-wide configuration file for all users is in **/etc/ssh/ssh_config**.

Kind regards,  
Theodora


author: Rhea Malviya
body: also, in the midst of troubleshooting last week, our it team set up an app pw which is still there. If i revoke that to rely on ssh instead would that work? is this the issue?


Tags: cloud

git

repository
want to clear specific old commit history and run GC on single repository
Asked by Chandrasekhar Kunuturu:

Hi Team,  

We need to clear some specific old commit history on single repository and then run the GC for the same repo.

also what is the default schedule for running GC ?  

incase if we want to run the GC manually from our end , is it a good practice?  
if yes can you please provide the steps to do that.

Thanks,


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

A git gc runs on every push to a repository but with different parameters depending on several different conditions. It cannot be triggered manually on the remote repo by end users.

If you rewrite history in the repo and push your changes, please reach out to us afterwards and ask that we trigger a git gc for the repo manually to clean up unreferenced objects.

You can either leave a reply here or you could also raise a ticket with the support team since you have access to a workspace on a paid billing plan. You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to use pyarmor (version 7.7.4) in CI/CD without having pyarmor-regcode.zip stored on repo
Asked by pmilosevic:

I'm using python 2.7.18 and I'm forced to use pyarmor version \<8.0 (7.7.4). Since there were crucial changes in pyarmor 8.0 (there is no more web Api ), the command I used for obfuscation "pyarmor register \<key_file\>" is obsolete and I need to change it with:

pyarmor register /path/_to_the_zip_file/

Is there any other way where pyarmor archive can be stored, instead having it stored on the repository? Repository settings allows to have secret variables, but not to upload files or archives which can be later used during CI/CD procedure.

Any help appreciated.


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

You can upload the file to the **Downloads** section of the repository (the option is on the left sidebar while viewing the repo in Bitbucket Cloud).

This will not make it available to Pipelines builds, but you can use our API in the bitbucket-pipelines.yml file to download it, in the script of the step that needs this file.

You can check the following knowledge base article for examples:

* <https://confluence.atlassian.com/bbkb/download-a-file-from-the-downloads-section-of-a-repository-1252006688.html>

You can use secured variables to store the credentials needed for authentication with the API call.

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

Kind regards,  
Theodora

comments: author: pmilosevic
body: Instead of upload it to Downloads, can I upload it on a Confluence page as an attachment and then download it from there? Is that possible? Do you have instruction to download such a file (\*.zip) in BB pipeline defined in yaml file?

Thanks in advance!


author: Theodora Boudale
body: Hi [@pmilosevic](/t5/user/viewprofilepage/user-id/5247167),

Assuming that you use Confluence Cloud, I see in our docs the following API endpoints for attachments:

* <https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-group-attachment>

There are examples for each endpoint, also with curl, on the right side of the page.

I am not an expert in Confluence, I specialize in Bitbucket Cloud. If you have any questions or issues with these APIs, I would suggest posting in the [Confluence collection](https://community.atlassian.com/t5/Confluence/ct-p/confluence) in community or reaching out to Confluence support team via <https://support.atlassian.com/contact/#/>.

You could also test the API call locally first, and execute it on your own computer to ensure that it is correct, before editing your yml file.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Setting --max-concurrent-uploads for self-hosted Linux docker runner?
Asked by compumike:

One of our pipeline steps is a \`docker push\` to a remote registry. The image has many layers.

This upload could be faster if we could increase the \`--max-concurrent-uploads\` that \`dockerd\` is started with (default 5).

Is it possible to change the \`--max-concurrent-uploads\` and \`--max-concurrent-downloads\` flags of the dind dockerd, or increase their default values? Thanks.


Answers:
author: Syahrul
body: G'day, [@compumike](/t5/user/viewprofilepage/user-id/5461940)

Welcome to the community!

Have you tried increasing it in the docker daemon config? I believe you can increase that in daemon.json for example:

```
{
"max-concurrent-downloads": 5,
"max-concurrent-uploads": 5,
"max-download-attempts": 5
}
```

Regards,  
Syahrul

comments: author: compumike
body: Yes, I have that on the host system's \`/etc/docker/daemon.json\` with \`max-concurrent-downloads/uploads\` set to \`50\`.

However, the Bitbucket Linux Docker self-hosted runner spawns a new \`dockerd\` instance within the runner. How can I set the config for that docker-in-docker \`dockerd\`? Thanks.


author: Syahrul
body: Hey [@compumike](/t5/user/viewprofilepage/user-id/5461940)

You are correct; my bad about that. Can you share your YAML example so I can review it and see if there's any alternate workaround available?

Regards,  
Syahrul


Tags: bitbucket-cloud

bitbucket-runners

cloud

docker
Something went wrong. Please try again later. 502 Proxy Error crucible
Asked by rahuldanwade:

while adding branch in review I am facing this issue.

Please help


Answers:
author: Piotr Swiecicki
body: 502 Proxy Error suggest this error comes from the reverse proxy you may probably have set up in front of Crucible instance. Can you check its logs? Perhaps there is a timeout configured on the proxy level, so if Crucible does not respond within defined timeout the proxy sends back 502 error? You may want to increase this timeout if that's the case.


author: Jobin Kuruvilla [Adaptavist]
body: Are you seeing any errors in the logs?

comments: author: rahuldanwade
body: No errors in logs except BEBUG


author: rahuldanwade
body: 2015-07-22 14:45:52,886 DEBUG \[ThreadPool3 \] org.hibernate.loader.Loader Loader-getRow - result row: EntityKey\[com.atlassian.fisheye.user.model.RecentlyVisitedItem#component\[username,entityType,entityId\]{username=equest, entityId=ACP-149, entityType=atlassian-review}\]


author: rahuldanwade
body: error ,branch review.JPG  
[](https://community.atlassian.com/t5/Fisheye-Crucible-questions/Something-went-wrong-Please-try-again-later-502-Proxy-Error/qaq-p/25255?attachment-id=763){#link_115acd841c9025}  
[](/tnckb94959/attachments/tnckb94959/fisheye-crucible-questions/303/1/error%20,branch%20review.JPG){#display_115acd841c9025_0}


Tags: fisheye-crucible-administration
Add Meta Data to <head>
Asked by owenmartin:

Hi,

I need to add the google verification code meta tag to the \<head\> of my FishEye instance - is there an easy way to do this?

Thanks!

Owen


Answers:
author: lpater
body: Hi Owen,

if you have a commercial license, you can download the jspsource version from my.atlassian.com, and modify the JSP files that contain the \<head\> tags to include your tag. See [https://confluence.atlassian.com/display/FISHEYE/Customising+FishEye's+look+and+feel](https://confluence.atlassian.com/display/FISHEYE/Customising+FishEye) for more details.

Best regards,

?ukasz


Tags: fisheye-crucible-administration
Defect classification not appearing
Asked by Rahul Aich [Nagra]:

HI

ON crucible, i added a new defect classification but the new entry appears for new review but not for old reviews. i.e. if i open an existing review and try to add a defect i cannot see my new entry.

What can be the cause?  
Rahul


Answers:
author: user1648639125013
body: Hi Rahul,

Currently in Crucible new Defect Classifications can't be added to existing reviews, we have an open Improvement Request for this which can be found here;

<https://jira.atlassian.com/browse/CRUC-7272>

Please refer to our [Implementation of New Features Policy](https://confluence.atlassian.com/display/DEV/Implementation+of+New+Features+Policy) for how we prioritise feature requests.

We would encourage you to log in, vote on the issue and become a watcher so you are updated of any changes made, it would also be beneficial for you to add any relevant comments you have on your current situation.

Cheers,

Chris


Tags: fisheye-crucible-administration
"Crucible cannot anchor the patch to this repository" with (Tortoise) SVN pre-commits
Asked by Eric Hirst:

We routinely see the "Crucible cannot anchor the patch to this repository" error when doing pre-commit reviews. Details below:

FishEye/Crucible 3.8.1 (also in 3.0.3, the version we're upgrading from)

TortoiseSVN 1.8.11 64 bit (the current version)

Subversion 1.8.13

1. Edit one of the first few (3 ???) lines of a file
2. From the Tortoise commit dialog, Create Patch / Save to Clipboard
3. Paste to pre-commit window in Crucible and upload

Note that the process seems to work fine normally, but fails whenever one or more of the files in the commit has a change in the first \~3 lines. A screen shot of the error is shown below.

Is there a fix or workaround for this?

Thanks, Eric

Untitled.png

[](https://community.atlassian.com/t5/Fisheye-Crucible-questions/quot-Crucible-cannot-anchor-the-patch-to-this-repository-quot/qaq-p/135751?attachment-id=3894){#link_115acda8e2afa7}  
[](/tnckb94959/attachments/tnckb94959/fisheye-crucible-questions/1816/1/Untitled.png){#display_115acda8e2afa7_0}


Answers:
author: Eric Hirst
body: This was fixed in the GA version of Tortoise SVN as part of version 1.9.0.26652, released August 5, 2015. We've tested that release in-house and confirmed that it resolves the issue.


author: Eric Hirst
body: I now believe the bug is in Tortoise SVN. TSVN's "Save to Clipboard" feature is including the start-of-file byte order marker (BOM) in the patch text it's creating. Pasting the same patch text from the clipboard into Notepad will result in a patch file that breaks TSVN as well. I've raised the issue on the TSVN mailing list.

Workaround will be to use TSVN's Save to File feature instead, until the issue is fixed in that tool.

comments: author: lpater
body: Please also consider raising an issue at <https://jira.atlassian.com/browse/CRUC>. We should be able to easily discard the BOM and still parse the patch correctly. Thanks!


author: Eric Hirst
body: Thanks Lukasz. Actually, the issue is already fixed in the nightly TSVN builds, and I expect that fix will go GA any day now. As I understand it, it came down to trying to pass the BOM through the lossy CF_TEXT format when a unicode format was more appropriate.See [http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061\&dsMessageId=3127411](http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127411) for more background.
When using Light SCM with Crucible, it appears that Adding branches to review does not work
Asked by Mark H_ Williams:

Does Adding Branches to a Review work when Repositories are on Light SCM?


Answers:
author: gustavo_refosco
body: Hi Mark,

The **Add branches to review** feature doesn't list repositories on Light SCM, so to make use of this feature I'd recommend adding the repositories to Crucible as **Native repository access** instead.

If you would still like to suggest this feature to be available for Light SCM repositories please feel free to create a feature request at <https://jira.atlassian.com>. Please refer to [Atlassian's policy](http://confluence.atlassian.com/display/DEV/Implementation+of+New+Features+Policy) about the implementation of new features.

Regards,

Gustavo Refosco
where is fisheye administrator password stored on linux
Asked by jfloyd:


Answers:
author: gustavo_refosco
body: Hi,

If you are talking about the password you used to access the Administration section by clicking in the link at the bottom of the page, this is stored as a hash within the **config.xml** located under your FISHEYE_INST directory.

In case you need to reset this password please refer to <https://confluence.atlassian.com/display/FISHEYE/How+to+reset+the+Administration+Page+password+in+FishEye+or+Crucible>

Regards,

Gustavo Refosco

comments: author: jfloyd
body: thank you, that's exactly what i wanted.


Tags: fisheye-crucible-administration
Manually restore Crucible data from backup
Asked by Tummala:

Situation:

1) Took full backup

2)Uninstalled and Installed new version 3.8

3)I did try the restore commands ,for some reason it does not work.(nothing useful in logs)

but I'm not having any succes so far. After installing new version ,Which dirs do I need to remove to get it working?

or is there a way to manually replace files from zip (backup) or could I use any plugin to import the files like jira?

Any suggestions please, Thanks!


Answers:
author: gustavo_refosco
body: Hi Tummala,

Could you please clarify further how you observe the restore isn't working? Thus you mentioned there's nothing useful in the logs I'd like to know what's the output from the command line in which you run the restore command.

The restore procedure is fully documented at <https://confluence.atlassian.com/display/CRUCIBLE/Backing+up+and+restoring+Crucible+data#BackingupandrestoringCrucibledata-RestoringCrucibledata>, but please allow me to point some things you may be missing that should be important to notice:

* Make sure you have a clean FISHEYE_INST directory before running the restore. The FISHEYE_INST directory is indicated by the environment variable of the same name, so make sure you've created an empty directory and pointed the FISHEYE_INST environment variable to it before running the restore command. In case you don't have a FISHEYE_INST environment variable set, the restore procedure will just restore the data within the install directory.
* The `fisheyectl.sh` to be used to run the restore command is the one within the new install (to which you're going to restore the backup).
* Use the database options in the restore procedure as needed, in case you're trying to restore the backup to a different database, to make sure you won't override your existing database.

Regards,

Gustavo Refosco


Tags: fisheye-crucible-administration