youngmon/atlassian-qna huggingface dataset:
Is it possible to run pipe conditionally in `after-script`?
Asked by Jiwon Jeon:

Hi, I want to run pipe \`slack-notify\` conditionally after a step finished (in after-script statement).

Is there any syntax that run the pipe conditionally by checking BITBUCKET_EXIT_CODE (only when FAILED(1)) ?

Desired situation using pseudo-YAML:

\`\`\`yaml  
after-script:  
- envsubst \< ".pipelines/failed_pipe_payload.json.template" \> ".pipelines/slack_payload.json"  
- pipe: atlassian/slack-notify:2.0.0  
variables:  
WEBHOOK_URL: $SLACK_WEBHOOK_URL  
PAYLOAD_FILE: .pipelines/slack_payload.json  
condition:  
variables.BITBUCKET_EXIT_CODE: 1  
\`\`\`


Answers:
author: Oleksandr Kyrdan
body: Hi [@Jiwon Jeon](/t5/user/viewprofilepage/user-id/5195900)

Thank you for your question!

You could try the next solution:

```
script:
  - ...
after-script:
  - if [[ BITBUCKET_EXIT_CODE -eq 0 ]]; then exit 0; else echo "Step failed"; fi
  - envsubst < ".pipelines/failed_pipe_payload.json.template" > ".pipelines/slack_payload.json"
  - pipe: atlassian/slack-notify:2.0.0
  ...

```

Best regards,  
Oleksandr Kyrdan

comments: author: Jiwon Jeon
body: It works! Thanks for your support :)

I think it would be good if condition syntax is supported for pipe too!


author: Bitwise DEVS
body: Hi, I want to verify if \`$\` is really no longer needed in  
\`BITBUCKET_EXIT_CODE\` since if I remember correctly it is always prepend to the variable name in order to use it?

<br />

Thanks!


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
OIDC Support for Azure
Asked by Ebrahim Moshaya:

Based on <https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/> only AWS, GCP, or Vault are supported for OIDC Integration with BitBucket Pipelines. Are there plans for Azure support? Is there a workaround to get this working?


Answers:
author: Syahrul
body: G'day, [@Ebrahim Moshaya](/t5/user/viewprofilepage/user-id/5195637) and welcome to the community!

We have an existing feature request on this in the **Gathering Interest** status. Hence, as per our [Implementation of New Features Policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html), I highly suggest you **Vote** and **Watch** the feature request to show your interest at:

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

By doing this, you'll help our product team review the feature and decide whether to implement it in the future.

I hope this helps.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Custom Bitbucket Runner - Error using stages in bitbucket-pipeline.yml
Asked by Chad Greenburg:

I have a custom Bitbucket Runner running on an EC2 instance in AWS. It's a Linux Docker runner. I've noticed that I can't use stages in my bitbucket-pipeline.yml file. When I add a stage, commit, and push, the resulting pipeline errors with \`Unexpected response body\`. Has anyone else noticed this?


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

I've never come across this issue while using stages with a Linux Docker runner; I would like to ask for some additional info, so we can better help you:

1. Where exactly does this error show? Is it in a build's build log? Or somewhere else?
2. Can you post here the content of your bitbucket-pipelines.yml file? You can sanitize any private/sensitive info prior to sharing and even remove the commands from each step's script, I would just like to see the structure and indentation in the bitbucket-pipelines.yml file.
3. What version of the Linux Docker Runner are you using?

Kind regards,  
Theodora

comments: author: Chad Greenburg
body: After reading your second point, I found that the indentation was incorrect. I didn't double indent the everything under "- stage:". Thanks for your help, this issue is fixed.

Without that indentation this is what I was receiving. The validate pipeline page said the yml was fine so I didn't even think about indentation.

![Screenshot 2023-04-14 at 2.00.01 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/252230i899A8C9035D0F00C/image-size/large?v=v2&px=999 "Screenshot 2023-04-14 at 2.00.01 PM.png")


author: Theodora Boudale
body: That's good to hear Chad, thank you for the update.

I will look into the issue with the validator and bring it up to the appropriate team.

Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-development

bitbucket-pipelines

bitbucket-runners

cloud
Receiving Message: Bitbucket changed your access to the repository
Asked by mkalinowski:

Several individuals are receiving the following message multiple times throughout the day:

Bitbucket changed your access to the repository

Access level: read write

Any ideas why we are receiving these.

Please note I just acquired the technical lead role for our Atlassian Products.

Thanks,


Answers:
author: Syahrul
body: G'day [@mkalinowski](/t5/user/viewprofilepage/user-id/4788007)

This email is sent out whenever a group's permission is changed on a repository.

For example, if **GroupA** has **read** permission on **RepoA** , and an admin changes the group permission on **RepoA** from **read** to **write** access, this will trigger an email to everyone in the group to let them know the repository permission has been changed.

This information is mentioned in our Notification documents which can be found at:

[Manage email notifications for watched objects](https://support.atlassian.com/bitbucket-cloud/docs/manage-email-notifications-for-watched-objects/)

Cheers,  
Syahrul

comments: author: mkalinowski
body: [@Syahrul](/t5/user/viewprofilepage/user-id/744536) Thank you for your response it is appreciated.

Marlana


Tags: bitbucket-cloud

cloud
Not able to connect with jenkins using bitbucket repo url
Asked by Rajaguru Seetharaman:

Failed to connect to repository : Command "git ls-remote -h -- [https://\*\*\*\*\*\*\*\*\*\*\*@bitbucket.org/\*\*\*\*\*/repo-name.git](https://***********@bitbucket.org/*****/repo-name.git) HEAD" returned status code 128:  
stdout:  
stderr: remote: Login failed due to incorrect login credentials or method.  
remote: If you are unsure of which login details or login method to use, visit:  
remote: <https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/>  
fatal: Authentication failed for '<https://bitbucket.org/workspace-id/repo-name.git/>'

When try to connect bitbucket url with jenkins getting this error


Answers:
author: Theodora Boudale
body: Hi [@Rajaguru Seetharaman](/t5/user/viewprofilepage/user-id/5030879),

What kind of authentication are you using? Are you using the credentials of a Bitbucket user?

If so, please keep in mind that we have deprecated the use of account passwords for Git operations via HTTPS. In case you are using username+password, you will need to generate an app password and use that instead of a password (in combination with the account's username):

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

Please make sure that the account you are using for authentication has access to this specific repo.

Feel free to let me know how it goes or if you use a different method of authentication.

Just a heads up, I removed the workspace-id and repo name from the URLs in your post to protect your privacy.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Stopped receiving email notifications
Asked by r_brouwer:

[@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) I'm not recieving emails when someone making a new branch and committing in it for a repository.


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

Your email address is not in any of our suppression lists. I also checked our email logs, and I can see that we sent several emails to your email address in the last few days, and all of them show to have been delivered to your mail server.

Can you please check if you are added as a watcher to this repository?

1. Open the repository on Bitbucket Cloud website
2. Select its **Source** page from the left sidebar (in case it is not the one opened by default)
3. While viewing the **Source** page, you will see an option with 3 dots, close to the top right corner, and next to the **Invite** and **Clone** options. Select the 3 dots.
4. Then, select **Manage notifications** :  
   ![Screenshot 2023-04-14 at 12.47.03.png](https://community.atlassian.com/t5/image/serverpage/image-id/251804i7CAF5541171B2E2D/image-size/large?v=v2&px=999 "Screenshot 2023-04-14 at 12.47.03.png")
5. In the new frame that opens, if you see "You are not watching this repository", please select the button **Watch this repository** and then check the **Commits** option. If you are watching this repository, but you are not subscribed to notifications for commits, make sure you select **Commits**.

Please feel free to let me know how it goes and if you still need assistance.

Just a heads up, I moved your post to a new question. It's best to have a separate question for each issue, as the root cause of a certain issue may not always be the same for all users; so, a question can become convoluted and difficult to follow if we try to troubleshoot multiple users' issues. Additionally, a new question has better visibility to the rest of my team, in case I am out of office.

Kind regards,  
Theodora

comments: author: r_brouwer
body: I looked over the email, I'm sorry. Thanks for the support.

Only in the email I can't see in which branch the commit is done. So I thought it was in the main branch, but it doesn't have to.


Tags: bitbucket-cloud

cloud
We couldn?t log you in
Asked by Tomi Helev?:

No matter what browser or PC I try to log in with, this same error persists. I can log in fine to atlassian.com and I can use this same account to post this question, but I can't log in to Bitbucket.

You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again.


Answers:
author: Ben
body: Hey Tomi,

I have just re-enabled your workspace, I could see that it was marked as "DORMANT" due to not being logged in for a very long time.

Please attempt to log in and let me know how it goes.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Tomi Helev?
body: Signing in worked fine, but there are two workspaces that I can't leave or manage. Not a huge problem, but some old resources that are no longer relevant.


author: Ben
body: Hi [@Tomi Helev?](/t5/user/viewprofilepage/user-id/3626499)

Awesome news! As for those workspaces, it looks like your workspace membership went stale in the backend when your account was in a dormant state. I've just refreshed these in the backend which has removed those 2 workspaces you mentioned from your account :)

Cheers!

- Ben (Bitbucket Cloud Support)


author: hats
body: This is happening also with my account. I cant log in with my account.


author: Ben
body: [@hats](/t5/user/viewprofilepage/user-id/5279531) Done! :)


author: aparra
body: I have the same problem..


author: Ben
body: Hi [@aparra](/t5/user/viewprofilepage/user-id/5422682)

I can't see any accounts linked to the email you have logged this question with that are de-activated, can you try to load Bitbucket in a different browser or with cache cleared?

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Unable to Push/Sign in
Asked by c:

I'm trying to push my recent changes to the server but it keep getting asked to sign in and it then fails and cancels the push. The error I get is

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --set-upstream origin master:master  
Logon failed, use ctrl+c to cancel basic credential prompt.  
remote: Invalid username or password  
fatal: Authentication failed for 'https://greenbraygames@bitbucket.org/greenbraygames/repo.git/'  

Pushing to https://greenbraygames@bitbucket.org/greenbraygames/repo.git  
Completed with errors, see above.

I made no changes to my account or source tree app settings since I pushed my code last and I can sign in just fine on this site and bit bucket with the same everything. what is going on here and how do I fix it?


Answers:
author: Mike Corsaro
body: Hello! Please see the reply to this question: <https://community.atlassian.com/t5/Sourcetree-questions/Re-Sourcetree-can-t-pull-push-login-problems/qaq-p/955958/comment-id/26451#M26451>

Thanks!

comments: author: c
body: That didn't work either. I tried to install that GCM and version of sourcetree but now I get prompt twice instead of once and it fails. the same password works fine on the web


author: c
body: [@Mike Corsaro](/t5/user/viewprofilepage/user-id/842547)That didnt work either. I tried installing it multiple ways including unistalling, restarting my computer, and reinstalling. nothing works. what else can I do
Suddenly sourcetree is asking me to enter my password when doing a fetch or pull or push.
Asked by adriandrojero@gmail.com:

I have validated I can log onto bitbucket and atlassian with my current user id and password. I have removed the authentication information from tools options in sourcetree. I even reset my password just in case. Please help


Answers:
author: minnsey
body: Hi  

It is possible this is due to the removal of TLS Bitbucket, see <https://community.atlassian.com/t5/Sourcetree-questions/Unable-to-authenticate-on-Windows-using-username-password/qaq-p/954836#M26404> for more information.  

Essentially it involves making sure you have up to date Git/Git Credential Manager and Hg/Sourcetree versions.

comments: author: adriandrojero@gmail.com
body: Thanks for your reply. I went ahead and implemented the sugested approach. Still facing same issue.
checkout not working windows
Asked by Maura Hill:

Hello, I've been experiencing some issues with sourcetree since yesterday. We thought it was an authentication problem since more of my colleagues had the login promt screen appear several times.. we tried trouble-shooting with removing all passwords in windowscredential, refreshing the OAuth etc. And for some it worked and as for me.. I can fetch/pull but can't checkout any branches to no avail it gets stuck downloading the first png of 10kb and that's it.

I was running Sourcetree v. 2.6.10.0 and just downloaded 3.0.8 yesterday mid-day to see if it helped (it didn't)

Is this indeed something about authentication.. has this been reported before and about to be fixed?


Answers:
author: Ruud Geldhof
body: okay using the git bash terminal has slightly better results, you can open it by clicking the terminal button in the top right corner.  
Once there, run "git checkout \[your branch name\]".  
It should prompt you for a password.  

Got some mixed results, in my case it worked fine, in the case of a colleague, she is prompted for a password each time a single file is downloaded..

comments: author: Ruud Geldhof
body: of course, it would be nice if it would just work normally....


author: Dmitry
body: Somenone here suggested to erase all the data from SourceTree (in AppData) and reinstall. I tried that - did not helped at all.


author: Ruud Geldhof
body: having the same issue. been troubleshooting for hours now..
Sourcetree?Bitbucket????????????
Asked by Michiko M:

Windows??????SourceTree?Bitbucket?????????????????????

Invalid username or password

fatal: Authentication failed for '?????URL'

????????????

web???????????????SourceTree?????Atlassian????????????????????Remote????????????????????

Remote???????????????????Clone????????????URL???????????????????????????????

????????Windows?????AppData????user.config???

????????????????????bitbucket?????????

SourceTree?????????Bitbucket?????????????

???????????????????????????????

?????????????????????


Answers:
author: Ai Hirama
body: ????????????????????

???????????????????????????

* SSH??????
* Sourcetree?????????????????(???????????)

????????????????


author: Ai Hirama
body: ????????????????????????????????

?????????????????????????????

??????????????????????????


author: Michiko M
body: ??????????????????

?????????????

??PC??SourceTree?Git??????????????????????????????????????????????

????3.0.12????????????????????????????

?????????????????

????????????


author: Ai Hirama
body: ??????????????

?????????????????????????????????????

* [Unable to authenticate on Windows using username/password.](https://community.atlassian.com/t5/Sourcetree-questions/Unable-to-authenticate-on-Windows-using-username-password/qaq-p/954836)

Sourcetree?????????????????????????????????3.0.12?????????????????


author: Michiko M
body: ??????????????

Git???????????????????????????


author: Ai Hirama
body: ??????????????????

????Git??????????????????????????Windows???Git?????????????????????????????????????????????????????


author: Michiko M
body: ??????????????????

?????????????????????????????????????

SSH??????????????????????????SourceTree?????????????????

?????????????HTTPS??????????????????????????????????

???????????????????????????????

?????????????


Tags: language-ja
unable to install because grant access redirects to localhost
Asked by Dave Cox:

Trying to install sourcetree

I have a bitbucket account with some team repos

after granting access it gets redirected to https://localhost:34106/?state=authenticated\&code=Q6ythhawktqAGb

when viewing my account. i can see that i have granted access to source tree but the installation is waiting for the login to finish.


Answers:
author: minnsey
body: Hi  

That redirect is correct. The registration uses an OAuth callback to that local url and a temporarily running server to capture the auth_token.  

That URL should load a page indicating the process has completed and then the Welcome Wizard should indicate it has checked and confirmed your credentials.  

If you are just getting an never ending green progress bar awaiting for login to complete it sounds like an error. Can you raise an issue at <https://jira.atlassian.com> and include the %localappdata%/Atlassian/Sourcetree/sourcetree.log file.  

thanks
abort: error: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:590)
Asked by Peter Gilbertson:

I am all of the sudden getting errors while using SourceTree today. The first error I got on multiple repos when I tried to push changes was this:

abort: error: \[SSL: WRONG_VERSION_NUMBER\] wrong version number (_ssl.c:590)

I updated my Sourcetree to the latest version to see if that would help. Now I am getting this error:

abort: error: \[SSL: UNSUPPORTED_PROTOCOL\] unsupported protocol (_ssl.c:590)

Currently running Sourcetree - Mac - Version 2.4.1 (97)

Please advise with any steps I can take to resolve the issue.

Thanks!

![sslerror.PNG](/t5/image/serverpage/image-id/39281i05DED30D02A6C948/image-size/large?v=v2&px=999 "sslerror.PNG")


Answers:
author: jredmond
body: Have you looked at <https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01> ?


Tags: mercurial

push

ssl
Changing password in Source Tree 1.6.1 (Mac 13)
Asked by cewmbxk:

I keep getting the following error when I try to push updates and I don't know how to fix the problem.

hg push --new-branch default

abort: error: \[SSL: WRONG_VERSION_NUMBER\] wrong version number (_ssl.c:590)

pushing to https://cewmbxk@bitbucket.org/cewmbxk/mms4-maul-icesight

Completed with errors, see above


Answers:
author: Ana Retamal
body: Hi Brian, welcome to the Community!

First of all, that's quite an old version of Sourcetree and we recommend you to upgrade to a more recent one, you can download them from [our archive](https://www.sourcetreeapp.com/download-archives).

We need to figure out if this is a problem with Bitbucket, Mercurial or Sourcetree:

1. What version of Mercurial, Python and SSL are you using?
2. Have you tried pushing from the command line? Do you get the same error?
3. Are you using a proxy?
4. Have you tried SSH? For more info, you can read [Set up an SSH key with Sourcetree on Mac](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html#SetupanSSHkey-ssh4SetupSSHwithSourcetreeonmacOS).

Let us know!

Ana


Tags: mercurial
I keep getting enter user id and password even though i stoed the user id and password
Asked by Krishnakumar Ramamurthy:

I am unable to login even though my credentials are stored and correct. the user id and password window keep coming and i am unablet to do any activity.


Answers:
author: Krishnakumar Ramamurthy
body: am getting a different issue. The issues is sourcetree throws an error(please see the error details below) when it tries to push to remote. when i pushed to git terminal and after accepting the pasword it pushed to remote repository sucessfully.

Error message:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks commit -q -F C:\\Users\\xxx\\AppData\\Local\\Temp\\ws3bdkid.n5j

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin feature/BLU-6889:feature/BLU-6889  
fatal: HttpRequestException encountered.  
An error occurred while sending the request.

remote: Too many invalid password attempts. Log in at <https://id.atlassian.com/> to restore access.  
fatal: unable to access 'https://krishnafse@bitbucket.org/fsenet/portal.git/': The requested URL returned error: 403

Pushing to https://krishnafse@bitbucket.org/fsenet/portal.git  
Completed with errors, see above.

comments: author: minnsey
body: I think your Bitbucket account has simply locked up API access, please go to the Bitbucket website and explicitly logout and then log back in again, this should free up any locks.


author: Krishnakumar Ramamurthy
body: Even after logging out of bitbucket and logging in. i am unable to push the commits to remote. the message says "Your commit succeeded but your push failed. Use the Push toolbar button.


author: minnsey
body: And if you try to manually push now do you get the same 403 error?  

It looks like you have valid Bitbucket credentials but not permission for that repository?


author: Krishnakumar Ramamurthy
body: if i use the terminal to do git push then it ask me the bitbucket user id and password and it works fine. the only issue is when i try to commit or push using the sourcetree.


author: minnsey
body: Hi  

It is possible you are hitting issues with TLS, please see <https://community.atlassian.com/t5/Sourcetree-questions/Unable-to-authenticate-on-Windows-using-username-password/qaq-p/954836#M26404> for more information
HOWTO Pull from a folder and force down files/folders using SourceTree.
Asked by John Brumbelow:

Please help,

We want to pull all files and sub-folder from a specific folder in a repository, and FORCE them down to lour local machines.  
How can one do this in SourceTree?

To clarify, envision we have 1 repository laid out as such:

MyRepo\\Project1\\Code  
MyRepo\\Project1\\Content  
MyRepo\\Project1\\Resources  
MyRepo\\Project2\\Code  
MyRepo\\Project2\\Content  
MyRepo\\Project2\\Resources

Then envision, Developer-#1 pushes/comits changes to MyRepo\\Project1\\Content.  
Developer-#2 works in MyRepo\\Project1\\Code and changes some files, for testing purposes.

How can Developer-#2, use SourceTree, to pull down all files, folders, sub-folders, from the folder "MyRepo\\Project1", and merge/over-write all files/folder/sub-folder into their MyRepo\\Project1, by ONLY SPECIFICY the folder "MyRepo\\Project1"?

If the term "branch", "repository", "Change set", or something else is even considered at all, then that is not the answer to the question. The question can only be answered by one is in SoureTree, looking at the folder "MyRepo\\Project1", and some how click, right-click, or go into a menu to force down all changes from that folder.


Answers:
author: Mikael Sandberg
body: Git pull does not allow you to just pull specific folders/files. In order to do that you would have to use something like [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) (which has several drawbacks) or [sparse checkout](https://briancoyner.github.io/2013/06/05/git-sparse-checkout.html).