youngmon/atlassian-qna huggingface dataset:
command to get the Work Item or User Story number which is used for the Pull request
Asked by jsandeepkanth:

I'm looking for a command to get the Work Item or User Story number which is used for the Pull request.

We use Atlassian Tool Suite and for any PR to be merged, we would require a Jira User Story to be added in the PR comment sections.

I tried a few commands but they give me info more on the PR and PR commit message.

Is there a way to directly get this user story number used to merge the PR from bit bucket instead of trying to parse the commit message of the PR .


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

I'm afraid that our API doesn't provide this info at the moment.

We have a feature request to provide this info via our API:

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

The request has been closed due to inactivity, but I would suggest leaving a comment there to express your interest, as our product managers continue to monitor even closed requests.

The only workaround right now would be to parse the commit messages to get the Jira issue keys, as you mentioned.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Why is BITBUCKET_COMMIT short all of a sudden?
Asked by Joshua Behrens:

I have scripts comparing BITBUCKET_COMMIT and git rev-parse. We noticed in a 1yo repository where we now added that kind of script, that BITBUCKET_COMMIT for whatever reason is now only 12 characters long. This way the short revision compared with the long revision from git rev-parse will never be equal again like this. Is this a change where I missed a memo? Which newsletter do I need to subscribe?


Answers:
author: Theodora Boudale
body: Hi Joshua,

Is the build that returns the short hash running on a pull-requests definition?

Builds that run on pull-requests will return a short hash for BITBUCKET_COMMIT. However, builds running on branches, tags, custom pipelines, and the default pipeline will return the full hash for BITBUCKET_COMMIT.

We have a bug report about this in our issue tracker:

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

Workaround:

You can use the following command in the script of that step, prior to using the variable:

```
- export BITBUCKET_COMMIT=$(git log -1 --format="%H" $BITBUCKET_COMMIT 2>/dev/null)
```

The variable BITBUCKET_COMMIT will then return the full commit hash.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

environment-variable
Can't log into BitBucket
Asked by S Patterson:

Hi,

I can't log into Bitbucket, I keep getting the "We couldn't log you in" error, regardless of what browser I use.

I've seen other answers for this saying it was because the account was marked as inactive, but I JUST created an account so...?? Not sure how it could be inactive? I may be crazy, but I do not recall ever creating an account prior for it to be inactive...

Also, not sure why this is under a different user name (shown when I went to ask this question) and not the work email I signed up under? (which would indicate I had a prior account but, again, I swear I never did but maybe I'm just crazy....)

Thanks


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

There is an existing Bitbucket cloud account with your email address that was created quite a few years ago and it was inactive.

I went ahead and reactivated it, so you should be able to log in now.

If you want, you can change the username of the account from this page (after you log in): <https://bitbucket.org/account/settings/>

You can also change the workspace-id of your personal workspace if you go to this page: <https://bitbucket.org/account/workspaces/>, then select **Manage** for your workspace. On that new page that opens you will be able to see the workspace name and the workspace id, and you can change them.

Kind regards,  
Theodora

comments: author: S Patterson
body: Thank you!! \& Double thanks for the links to update things! :)


author: Theodora Boudale
body: You are very welcome! Please feel free to reach out if you ever need anything else!


Tags: bitbucket-cloud

cloud
Email suppressed
Asked by Anton V?drin:

One of our users has stopped receiving any notification emails from Bitbucket - could you please take a look and see if he might be on the suppression list?

-redacted-


Answers:
author: Anton V?drin
body: Thanks a million!  

It did come out that we have 2 more users experiencing the same issue:  

<br />

Could you please take a look is they are part of the same list?

In the interest of safety can I DM the specific addresses?

comments: author: Syahrul
body: Hey [@Anton V?drin](/t5/user/viewprofilepage/user-id/5114472)

I have created a support ticket on behalf of you to continue.

You can view the support case at our support portal [here](https://support.atlassian.com/requests/BBS-196758/).

Cheers,  
Syahrul


author: Syahrul
body: Hey [@Anton V?drin](/t5/user/viewprofilepage/user-id/5114472)

G'day and Welcome to the community!

I have removed the email address to avoid any issues.

That said, I have removed the user suppress from our list, so it should no longer block the user.

Can you try to mention the user in PR etc., to see if the user can receive new email notifications?

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Getting "We couldn?t log you in" Error due inactivity?
Asked by Alexandre Lucena:

Hi, i've tryied to login in to bitbkucket with google account and through "forgot password" but couldn't connect either way.  

I aways get "We couldn't log you in" error, even disabling extensions and different browsers (Chrome/Opera).

I saw another post where support (Theodora) suggests to create a "question" here to get the problem solved, so here I am.  

(<https://community.atlassian.com/t5/Bitbucket-questions/Stuck-in-quot-We-couldn-t-log-you-in-quot/qaq-p/1660635>).  

Thanks in advance,


Answers:
author: Syahrul
body: Hey [@Alexandre Lucena](/t5/user/viewprofilepage/user-id/5114433)

G'day and Welcome to the community!

Your account has been inactive since your last login was a few years ago. I have proceeded to reactivate your account, which should unblock your login.

Can you try again and let me know how it goes?

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
I Registered To Bitbucket With My Work Email, However I Don't Have an Access Now
Asked by Fatih Tan:

Hi,

I registered to Bitbucket my work email 4 years ago. I left the work and I don't have an access to that email. So, I cannot reach my atlassian account.

What should I do? Is there any account recover process?

Thank you for your suggestions


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

If the account is not managed by your former employer and you remember the password, you can log in to the account and then change its email from this page: <https://id.atlassian.com/manage-profile/email>

If you don't remember the password or if the account is managed by your former employer, it will not be possible to access the account and change its email.

The Bitbucket Cloud support team cannot change the primary email address of an account if someone reaches out from an email that is not associated with that account.

Kind regards,  
Theodora

comments: author: Fatih Tan
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

Thank you for your answer. Actually I don't want account back, I just want my username back. Is it possible to make username free.

My current username is @\<current-username\> but i want @\<old-username\>.

Regards


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

We have reviewed your request internally and changed the username of the old account by adding the prefix '-old', so you can use it now.

Please keep in mind that this is something we do in exceptional circumstances only when certain criteria are met.

Feel free to let me know if you are able to change your username now and if you need anything further.

Just a heads up, I removed both usernames from your post to comply with our privacy policy.

Kind regards,  
Theodora


author: Fatih Tan
body: Thank you so much. I've just updated as @\<username\>.

Have a great day.


author: Theodora Boudale
body: You are very welcome, please feel free to reach out if you ever need anything else!

Have a good day,  
Theodora


Tags: account

bitbucket-cloud

cloud

email

login
rpc error: code = Unknown desc = failed to pull and unpack image
Asked by Ahmed Ayadi:

Hello

I build locally a docker image from mcr.microsoft.com/windows/servercore:ltsc2019

The image size is 25 Go

I pushed this image to my Azure Container Registry

When I pushed this image, I have this message "skipping foreign layer", but my image is pushed and sh256 is generated

I added login parameters to the BB environment

When I try to pull this image from my BB pipe, I have this message:

rpc error: code = Unknown desc = failed to pull and unpack image "xxxxx.azurecr.io/imgvs2017:v1": failed to extract layer sha256:2f7d24a: link /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/2521/fs/Files/Program Files/common files/Microsoft Shared/Ink/en-US/micaut.dll.mui /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/2521/fs/Files/Program Files (x86)/common files/Microsoft Shared/ink/en-US/micaut.dll.mui: no such file or directory: unknown

Did you have an explanation or how to fix it?

Regards,

Ahmed


Answers:
author: Senocico
body: I encounter the same issue...

comments: author: Ahmed Ayadi
body: After verification, I think that Bitbucket not support yet a Windows docker image


author: Ahmed Ayadi
body: To separate the problem I try to pull directly Windows image, the pipe fail with this message:

rpc error: code = NotFound desc = failed to pull and unpack image "mcr.microsoft.com/windows/servercore:1903": no match for platform in manifest: not found


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Only run if pipeline trigger tag contains numbers, not letters
Asked by Brian Kidmose Andersen:

Hi,  
our pipeline yml file contains the following: section, that will be executed if a commit is tagged with the fomat \*.\*.\*;  
------------------  
'\*.\*.\*':  
- step:  
name: Tagged triggered release build  
-----------------  
However we would like that the pipeline _only_ gets triggered if the asterisks are numbers, and hence not letters. Is this possible and if yes - how?  
Regards,  
Brian


Answers:
author: Theodora Boudale
body: Hi Brian,

I'm afraid that this is not possible to achieve with glob patterns. We have a feature request to support regex, which would allow such a match:

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

I would suggest adding a comment to the feature request with your use case for our product managers to take into account and also adding your vote to it (by selecting the **Vote for this issue** link).

You can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
How to add a brand new file to bitbucket using server api
Asked by Kaushal Krishna:

Not able to add new file using bitbucket server api.

Also please help me in repairing my code.

auth is repository access token  

```
from variables import base_url,repo,file,username,auth

import requests
import json

url = f"http://{base_url}/rest/api/latest/projects/~{username}/repos/{repo}/browse/{file}"

contents=None
with open(file,"r") as f:
    contents=f.read()

payload={
  "branch": "master",
  "content": contents,
  "message": "Holla",
  "sourceCommitId": None
}


```

```
headers = {
    "Accept": "application/json",
    "Authorization": f"Bearer {auth}",
    "Content-Type": "multipart/form-data"
}
```

```

response = requests.request(
"PUT",
 url,
 headers=headers,
 json=payload
)


print(response)
```

Can someone please help ???????????


Answers:
author: Kaushal Krishna
body: Got the answer.

comments: author: Sumeet Rawal
body: Hi [@Kaushal Krishna](/t5/user/viewprofilepage/user-id/5114073) , I'm using the same api to add a file to repo and getting the following error response:  
409

*** ** * ** ***

{  
"errors": \[  
{  
"context": null,  
"message": "Support for editing files has been disabled.",  
"exceptionName": "com.atlassian.stash.internal.rest.content.ContentResource.FileEditorDisabledException"  
}  
\]

}

*** ** * ** ***

Did u face the same issue? If yes .. can u pls help me understand and fix it


author: venkatesh vp
body: I am not clear with what is accepted. Pls do provide the details. instead of the python code can we use a cul command to add file in the repo.


author: rajeshkumar.kumar
body: Hi [@Kaushal Krishna](/t5/user/viewprofilepage/user-id/5114073) ,

what is the answer ? can you please share it? what is the final api endpoint which you have used?


Tags: bitbucket-server

server
Can't push changes to Bitbucket
Asked by Gene_M:

I'm trying to push some minor changes up to Bitbucket with my normal Sourcetree workflow but am getting this error:

**git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin master:dev/gm/AddDefaultStateSequence**   
**Pushing to <https://bitbucket.org/Gene_M/cpf_h7a3.git>**   
**To <https://bitbucket.org/Gene_M/cpf_h7a3.git>**   
**= \[up to date\] pre-rearchitecture-checkpoint -\> pre-rearchitecture-checkpoint**   
**! \[rejected\] master -\> dev/gm/AddDefaultStateSequence (non-fast-forward)**   
**error: failed to push some refs to '<https://bitbucket.org/Gene_M/cpf_h7a3.git>'**

**hint: Updates were rejected because a pushed branch tip is behind its remote**   
**hint: counterpart. Check out this branch and integrate the remote changes**   
**hint: (e.g. 'git pull ...') before pushing again.**   
**hint: See the 'Note about fast-forwards' in 'git push --help' for details.**

<br />

**Completed with errors, see above.**

I was able to commit the changes but the push failed. As far as I can tell I'm using the same process I've always used, but for some reason that I can't figure out, it isn't working this time. I've tried using git bash and get the same error. Any suggestions will be greatly appreciated. Thanks


Answers:
author: Syahrul
body: Hey [@Gene_M](/t5/user/viewprofilepage/user-id/653484)

G'day.

Based on the error message, it looks like your local repository copy is outdated.

This happens when there's a new commit in the branch you are working on the remote repository that you don't have the copy locally. So git rejected your push because of this.

The workaround is to do a git pull to ensure your local repository copy is updated with the latest changes.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud

sourcetree
Mac OS Version 2.7.3 - How to Change the History Window Fonts/Spacing
Asked by Ed G.:

Upgraded to 2.7.3(honestly, regretting it); how do I get a denser 'commit history view'? It seems the font and row spacing changed. I don't quite understand why... no icons increased size - I've just got less history, more whitespace.

Searched preferences, menus - but I don't see an option to densify things.


Answers:
author: bgannin
body: You'll want to vote on and follow this ticket: <https://jira.atlassian.com/browse/SRCTREE-5154>


author: Ed G.
body: I reverted to 2.6.3.
No way to enter password on first time installation
Asked by Nikolaus Gerteis:

Folks,

when running Sourcetree for the first time, I'm guided through some setup steps. I went to the Atlassian website to create an account and then clicked 'Use an existing account' in the setup window. It opens a web interface where I can enter my e-mail address and click 'Continue'. But no field to enter my password comes up. Only thing is that the 'Continue' button changes to 'Log-in'.

When opening the log-in web page in a browser, a password field comes up.


Answers:
author: Ana Retamal
body: Hi Nikolaus! Can you give us some more information so we can troubleshoot this issue for you?:

1. What happens when you click on Log-in?
2. Are on Windows or Mac? (If you're on Windows, make sure Internet Explorer is updated to the latest version as Sourcetree relies on it for authentication).
3. Can you send a screenshot of the step where you get stuck?

Kind regards!

Ana

comments: author: Nikolaus Gerteis
body: Hello Ana. Thanks a lot for the answer! I found the solution today: After I moved Sourcetree from the desktop to the Applications folder (I am on macOS), it worked as expected. This is the first time I experienced problems when starting an app from the desktop.

Kind regards,

Nikolaus


author: Ana Retamal
body: Thanks for sharing this with us [@Nikolaus Gerteis](/t5/user/viewprofilepage/user-id/1304647)! Glad it's working for you now :)

Have a good day,

Ana
Differences between SourceTree and SourceTree Enterprise
Asked by Jos Helming:

Only recently I noticed there seem to be a SourceTree and a SourceTree Enterprise. Are these in fact different products and if so: is there an overview of the differences between the two?

I've tried to find such an overview, but haven't succeeded yet, hence this question. Any insights will be appreciated. Thanks in advance.


Answers:
author: bgannin
body: Hi Jos,

Please check out <http://sourcetreeapp.com/enterprise> as well as the link to its documentation on that page. Please let us know if there's anything missing or unclear.

Cheers,

Brian Ganninger  
Product Manager, Sourcetree


author: Daren Fowler
body: TLDR: It is a version meant for managed installation on an organization's Windows machines.

It would have been helpful to have a comment on the page that says something like:
> *For non-managed installs, please use the standard client at <https://sourcetreeapp.com/>*

Quote from <https://sourcetreeapp.com/enterprise>:
>
> *Manage installations and updates at scale* {#toc-hId--1382027797}
> ------------------------------------------------------------------
>
> *Give your developers the power and simplicity of a Git GUI client in your managed environment. Utilize computer management software to install, update, and manage Sourcetree across your entire organization's Windows machines.*


Tags: sourcetree-enterprise
Finish hotfix merges master into develop problem
Asked by and-rew:

The problem is that when i finish the hotfix than the hotfix branch merges first into master and than the master branch merges into develop. Why does it happen? I attach two pics for better understanding of what as is and what to be

**As is**

![2018-04-27 10_00_55-Sourcetree.png](/t5/image/serverpage/image-id/20789i782F72F82BDB80F1/image-size/large?v=v2&px=999 "2018-04-27 10_00_55-Sourcetree.png")

**To be**

![2018-04-27 10_03_34-Sourcetree.png](/t5/image/serverpage/image-id/20791i0BC60AE42ACD771D/image-size/large?v=v2&px=999 "2018-04-27 10_03_34-Sourcetree.png")


Answers:
author: Mike Corsaro
body: Hello! It seems that master isn't merged into develop, but the line is showing that it's just branched from master? What's the log message for that commit?

comments: author: and-rew
body: [@Mike Corsaro](/t5/user/viewprofilepage/user-id/842547) Yeap, the hotfix is branched from the master as it required by gitflow methodology:

![2018-06-05 16_49_45-git-flow cheatsheet.png](https://community.atlassian.com/t5/image/serverpage/image-id/23825iC8C8DBF39586B951/image-dimensions/327x331?v=v2 "2018-06-05 16_49_45-git-flow cheatsheet.png")

If you've meant the log message for merge's commit so it is here:  
*merge hotfix/test2-hotfix: Merge made by the 'recursive' strategy.*


author: Manju
body: Can you please specify the version of Sourcetree you are using and on what platform?

comments: author: and-rew
body: [@Manju](/t5/user/viewprofilepage/user-id/222564) Source Tree v 2.4.8.0; Windows 10 Pro 64bit


author: and-rew
body: Can anybody help with this issue?


Tags: git-flow
Add account for remote repo where usernames have '@' character
Asked by markbellhouse:

How can I add an account for a remote repo in sourcetree for bitbucket server, where our bitbucket usernames have an '@' character in them, eg firstname.lastname@company.com.

The response message in the Edit Hosting Account dialog indicates it is hitting the rest api for /rest/api/1.0/users/firstname.lastname%40company.com, but the url that works is the one using the slug, which is /rest/api/1.0/users/firstname.lastname_company.com - but if I use the slug as the username in the dialog, I get an "unauthorized" error.

I can clone repos one-by-one, but it'd be nice to get the full list in the remote repos screen in sourcetree - is there some special thing I need to do to get this working?


Answers:
author: bgannin
body: Hi Mark,

Can you please file a ticket about this for us to reproduce and prioritize?

* [Mac bug tracker](https://jira.atlassian.com/browse/SRCTREE)
* [Windows bug tracker](https://jira.atlassian.com/browse/SRCTREEWIN)

Thanks,

Brian Ganninger  
Product Manager, Sourcetree


Tags: bitbucket-server
Show/Hide Branch Label in Windows
Asked by MatM:

We are a mixed ship with mostly Macs, but a few developers have windows boxes. We've noticed that the Mac version of Sourcetreet has a "Show/Hide Branch Labels" option in the view menu, but the Windows version seems to lack this feature.

When turned on a field called "Labels", which shows a branch, is listed in the pane with metadata about a commit along with the Author, date, committer, parents, etc.

I would like to enable this on our windows boxes as well, but cannot find the option.


Answers:
author: Mike Corsaro
body: Hello! Unfortunately, this feature does not exist in the Windows version of Sourcetree.
Not able to download source tree on windows10
Asked by swetha s:

Hi I am downloading source tree and not able to put login with my already existing account. The login page keeps on spinning without saying anything.


Answers:
author: Ana Retamal
body: Hi Swetha, which version of Internet Explorer are you using? Sourcetree for Windows relies on Internet Explorer for the authentication step, and it won't work properly if the version is not the newest one. Could you check that?

Let us know if that solved your issue!

Ana


Tags: windows
403 is killing me! I have to login 4-8 times per day
Asked by gen4:

Very often when I try to push my commits it returns 403.

I have to log in to make this error gone, but sometimes it resolving by itself if you just wait some time.

Why is it so? It is killing me!

In addition, there was double login in your login account section.

And now it is only one, but after entering a login/pass I got this

<https://monosnap.com/file/OWa4f4tKcs2lEXO7J5qWsg0wvhXkGB>

so I cant finish my auth.


Answers:
author: Manju
body: Can you please confirm the version of Sourcetree you are using? If not 2.7.3, please consider updating to the latest. Also, I'm guessing the service you are trying to authenticate is Bitbucket and you are using OAuth. can you please confirm that?