youngmon/atlassian-qna huggingface dataset:
Users and group access / Add members HTTP 400 (Bad request) error
Asked by ogmios:

When trying to add a new user to the repository (Repository Settings \> Users and group access / Add members) I get the following error in DevTools console along with **HTTP 400 (Bad request) error** code (tested w/ both Firefox and Chrome);  
**POST** <https://bitbucket.org/!api/internal/user-and-group-privileges/>\<USER\>/\<REPO\>/  
Uncaught (in promise) TypeError: r.includes is not a function  
a user-and-group-access.tsx:283  
M/$\< user-and-group-access.tsx:283  
onClick add-access-modal.tsx:148  
l usePlatformLeafEventHandler.js:61  
React 12  
y scheduler.production.min.js:19  
React 3  
i helpers.ts:87  
_wrapEventTarget trycatch.ts:185  
g instrument.ts:421  
React 10  
y scheduler.production.min.js:19  
React 6  
e esm-loadable.ts:228  
_loadModule esm-loadable.ts:239  
promise callback\*_loadModule esm-loadable.ts:238  
UNSAFE_componentWillMount esm-loadable.ts:186  
React 12  
\<anonymous\> app.tsx:123  
\<anonymous\> app.tsx:123


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

I would like to ask if you could try adding this user from a Private/Incognito window of either of the two browsers you tested, with ++all extensions disabled++.

If the same error occurs, we would then need a [HAR file](https://confluence.atlassian.com/kb/generating-har-files-and-analyzing-web-requests-720420612.html) generated while you try to add this user, which will show us details of the request. Since the HAR file includes private data, I would suggest ++not posting it here++: I can open a support ticket for you, which will be visible only to you and Atlassian staff, and you can then upload the file there for further troubleshooting.

Please feel free to let me know how it goes if you test this in a Private/Incognito window with all extensions disabled, and I can then open a support ticket if needed.

Kind regards,  
Theodora

comments: author: ogmios
body: Hi! The problem is the same even in incognito window w/ all extensions disabled.

I will generate the HAR file as requested.

Thanks


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

Thank you for your reply. I went ahead and opened a support ticket for you, using the email of your community account. You should have received an email with a link to the support ticket. In case you haven't received it, please let me know and I can post the link here (the ticket won't be visible to anyone other than you and Atlassian staff, even if they have the link).

You can attach the HAR file to the support ticket, so we can investigate this issue further.

I would like to ask if you could also leave a comment in the support ticket mentioning your timezone. We provide 9/5 regional support, so having the correct timezone ensures that you will get replies during your work hours.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Protecting the master branch and merging a pull request using command line
Asked by Simran:

We are using Bitbucket cloud and our master branch is protected to disallow any direct pushes.

1. Once the pull request is approved, Is there a CLI command that can be used to merge the pull request? This is because we would like to increment the version in the master branch right before the merge operation.

2. Is there a way to allow only specific branches to merge to the master branch?

Also, we are NOT using bitbucket pipelines.


Answers:
author: Mikael Sandberg
body: Hi [@Simran](/t5/user/viewprofilepage/user-id/4383573),

Welcome to Atlassian Community!

No, there is no specific Git command that would allow you to bypass the protection that you have set up in Bitbucket. By design Git does not care about permissions. The only way around it would be to allow specific users to merge to your master branch.

And there is nothing in Bitbucket that you can configure to only allow merges from specific branches. You could probably do it with git hooks, but you would have to add those hooks to each client and make sure they are updated whenever you make a change to the hook.


author: Ulrich Kuhnhardt _IzymesCo_
body: I would like to expand on [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579) 's response.

1. If you have an existing pull request to master in Bitbucket you can merge it with the following REST API command <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/merge> . Restricting commits to master to be only pull request merges is a good idea. Even if someone merges to master locally - they cannot push the changes to remote (Bitbucket)

2. As far as I know there is no technical option to limit the branches you can merge FROM to master. The best way I can think of is to limit the number of users that can merge to master via branch permissions, and then trust those users to adhere to the merge policy.

Let me know if I can help in any other way.

Kind regards, Ulrich

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


Tags: bitbucket-cloud

cloud
Why I can't transfer my repository ownership/workspace
Asked by Yacht4Less:

I have followed the documentation to transfer a private repo from one bitbucket user to another but although the "Repository transfer in progress" is displayed I never received any email and i can't find anywhere to accept the transfer.  
Should I wait for more than a day for the email to be sent? Or could something else be at fault?

Thank you.


Answers:
author: Ben
body: G'day Yacht4Less!  
When you are attempting to transfer a private repo from one user to another:

- Has the person you have transferred this repo to checked their email account? Usually when you are transferring a repo, it is the transferee that receives the email. Make sure they have checked their trash or junk folders in their email client of choice.

If you have any further questions, please feel free to reach out by replying to this answer.

Cheers!

Ben


Tags: bitbucket-cloud

cloud

repository

transfer
Bitbucket rest api for logs and artifacts
Asked by Nalini Gokulpure:

Hello, I'm going to use the new [build status API](https://docs.atlassian.com/bitbucket-server/rest/7.6.0/bitbucket-rest.html#idp226) introduced in BBS 7.4. In the [build results overview](https://confluence.atlassian.com/bitbucketserver/bitbucket-server-7-4-release-notes-1013849643.html#BitbucketServer7.4releasenotes-cicd), there are columns for "Logs" and "Artifacts". But the API doesn't cover that information. It is stated this information will be present if Bitbucket is connected to Bamboo or Jenkins. But I like to supplement Logs and Artifacts with a different tool. Simply spoken: By REST. Is this possible?


Answers:
author: Evan Slaughter
body: Hi [@Nalini Gokulpure](/t5/user/viewprofilepage/user-id/4534144)

This isn't something that's possible at this time, as those are only populated through the build server application-link functionality with either Bamboo or Jenkins at this time. With that in mind, it looks like there's a feature request documenting this specific business need that your team may want to vote on and add yourselves as watchers to:

* [Provide a Rest API to link log and build artifacts to the builds page](https://jira.atlassian.com/browse/BSERV-12946)

Outside of the above, it's recommended that your team store any needed custom details in one of the other customizable fields that are able to be set through the REST API as mentioned in the above REST API document you had linked.

Hope this helps!


Tags: bitbucket-server

server
Unable to create Pipelines
Asked by Synergy:

Hi Team,

I have enabled two factors and purchased standard package for our account and trying to enable pipeline, but I'm unable to do that, because, it's always asking me "[Two-step verification](https://bitbucket.org/account/settings/two-step-verification/manage) is required to enable Pipelines"

![Screenshot_269.png](https://community.atlassian.com/t5/image/serverpage/image-id/157863i4FE26937B16F1D75/image-size/large?v=v2&px=999 "Screenshot_269.png")![image_2021_08_27T09_29_38_902Z.png](https://community.atlassian.com/t5/image/serverpage/image-id/157864i56C4B7F56A851BAD/image-size/large?v=v2&px=999 "image_2021_08_27T09_29_38_902Z.png")


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

Bitbucket uses Atlassian accounts (the ones for <https://id.atlassian.com/>) for authentication.

At the moment, it is possible to enable 2FA for a Bitbucket account, or an Atlassian account, or both.

I can see from your screenshot that you have enabled 2FA for the Atlassian account. However, for Pipelines, 2FA is required for the Bitbucket account.

What you can do is the following:

- Disable 2FA for the Atlassian account from this page: <https://id.atlassian.com/manage-profile/security/two-step-verification>

- Afterwards, you can check the following documentation on how to enable 2FA on your Bitbucket account:

<https://support.atlassian.com/bitbucket-cloud/docs/enable-two-step-verification/>

You should then be able to enable Pipelines.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines
Build failing which succeeded 8 month ago (docker wine maven)
Asked by rkmuller:

I use BB Pipelines to build my java based software using maven 3.

I use a docker container based on Debian with JDK8, wine and maven installed.

The builds runs fine until the maven-exec-plugin is called:

```

<execution>
   <id>innosetup</id>
   <phase>package</phase>
   <goals>
      <goal>exec</goal>
   </goals>
   <configuration>
      <executable>wine</executable>
      <commandlineArgs>conf/innosetup5/ISCC.exe -Otarget -Finfomas-ce-v${project.version}-install conf/infomas-ce.iss</commandlineArgs>
   </configuration>
</execution>
```

This fails with the following message:

    /usr/local/bin/wine: Syntax error: Unterminated quoted string

8 month ago it just works fine (i just rerun a previous build). Also, when running locally (in the same container) everything goes well.

So it has anything todo with the BB Pipelines environments i guess?


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

I see in the info you have provided us that the variable ${project.version} is used and it seems to be the only variable part of the arguments you are passing. Has this variable been changed since the last successful build and does its value contain any quotes?

Kind regards,  
Theodora

comments: author: rkmuller
body: Yes, this value has been changed. The current value is "2.31.0", the previous was "2.30.1". So no spaces here or any quotes.


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

Thank you for the info.

Another possibility that comes to my mind is that there may have been a change in the Docker image you're using, but locally (where everything goes well) you may be running an older version of this image.

If this is not the case, please let me know and I can open a support ticket for you so we can investigate further. It's a bit difficult to troubleshoot this without checking the Pipelines logs and also the configuration files in the repo. If there is a support ticket open, the engineer working on your case will be able to access these which will allow for faster troubleshooting. The support ticket will be visible only to you and Atlassian staff.

If the docker container you're running locally is using the same image as the one used in Pipelines and not an older version, please feel free to let me know if you'd like me to open a support ticket for this issue.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Multiple SSH Keys Not Working
Asked by quizwedge:

When I add a repository to SourceTree, the key works. The problem is that when I check a file in it always wants to use my personal email address instead of my work email address in the Author field. Is there a way to have it use my work address for work projects and my personal email address for personal projects automatically? My work projects are through [slsapp.com](http://slsapp.com) and my personal projects are through bitbucket.

I've turned off "Allow SourceTree to modify your global Mercurial and Git configuration files" though that was on before.

ssh-add -l shows both SSH account.

Below is a modified version of my .ssh/config:

Host [slsapp.com](http://slsapp.com)

Hostname [slsapp.com](http://slsapp.com)

IdentityFile \~/.ssh/mykey

User [name@example.com](mailto:name@example.com)


Answers:
author: KieranA
body: This is to do with your git/hg configuration, in Git for example, you can do "git config user.email 'whoever@wherever.com'" and it'll use that for whichever repository you set the configuration option and it'll use that email address for that repository. Perhaps check your global/local configs to see what they have set? (By the way, user.name is the other configuration setting in Git). For Mercurial it's in the .hgrc file where the settings are "username" and "email". This could be located in \~/.hgrc unless you use more localised one per repository. Do "ls -a" at the terminal when browsed to your repository to see if it's there.

Take a look and let us know, happy to help further on this one!

comments: author: quizwedge
body: Thanks! Should have asked here first.


author: KieranA
body: If this answer worked, could you pretty please mark it as answered? It just helps me manage questions easier :) Thanks very much!


author: quizwedge
body: Sorry, thought I had. I tried again. If it's still not marked as answered, please let me know what I should do.
Partial shelve
Asked by Tobia Conforto:

Is there a way to do a **partial shelve** in a hg working copy?

My use case is having a working copy where I realize one of the issues I was working on (but far from being in a good state, let alone a committable state) can/must be postponed for a while.

Therefore I'd like to shelve the specific files (**or hunks**) related to that issue under a given label, to remove them from my working copy, to be addressed later.


Answers:
author: KieranA
body: Hi Tobia!

When we first used Hg's shelve extension it didn't support shelving hunks/files - recently this has changed and it now does which means we can add support for it. This one has already been filed after we found out it was possible here: <https://jira.atlassian.com/browse/SRCTREE-1363>

Hope that helps


author: Jean-Yves Avenard
body: It's been over one year now... Any progress on the matter?

You already don't support queues... lots of missing features ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad")

comments: author: KieranA
body: Hey Jean-Yves,For features like these we generally go on how much the community want it. I did take a long look into this one in the hope we could invest some time in it, but unfortunately we haven't been able to just yet. It's definitely one we'd like to implement, though.Cheers
What does discard local changes mean?
Asked by Will Riley:

I often see this option "Discard local changes?"

Precisely, what does this do? Does this delete files in the .gitignore list?


Answers:
author: KieranA
body: Hi there,

Discard local changes will literally discard the changes you've made to the file since your last commit or pull, so make sure you use it carefully! Although I'm not sure where you're seeing this option, the diff view offers the "Discard" button. The option is typically called either 'revert' or 'reset' depending on DVCS you're using.

Cheers

comments: author: ralvy
body: You will see this in SourceTree 2.7.6 (Mercurial) for Mac when you have Uncommitted Changes in the tree, and then DoubleClick on the last Commit. If you check the "Discard Local Changes" in the ensuing dialog, you will be returned to the last Commit with no Uncommitted Changes, so all your changes since the last Commit are gone. Very convenient when you decide all the work you did since the last Commit should be trashed.
Where is tracking option in Source Tree checkout branch
Asked by David McClurg:

In Source Tree, when I checkout a remote branch, where is the option to setup tracking so I can commit to my local branch?


Answers:
author: stevestreeting
body: By default master is checked out on clone.

To check out any remote branch as a local branch, double-click on the remote branch either in the log or in the sidebar under Remotes \> YourRemote \> remotebranch, and you can checkout a local branch from it. If the local branch is already there, you can double-click on the local branch again in the log or the sidebar to check it out.

comments: author: stevestreeting
body: Also if you already have a local branch and want it to track a different remote branch, right click on your local branch in the sidebar then use the Track Remote Branch submenu to pick what to track. This tracking is set up by default when you checkout a remote branch as a new local branch though.


author: KieranA
body: Hi David,

I've reported a feature request for you here: <https://jira.atlassian.com/browse/SRCTREE-1439>

Cheers

comments: author: David McClurg
body: Thanks Kieran. I think it's more of a tracking branch issue rather than a commit issue


Tags: check-out

track
found a bug is shown in the "Files in the Working tree" category.
Asked by Donghoon Kim:

Hi. I really want to say "thank you" first.

You guys are developing great service and product.

I found a bug is shown in the "Files in the Working tree" category.

1. CheckOut first

2. The bug occurs. - I don't modify any files.

The bug is caused when my files name or directory includes "Korean".

All files and directories including Korean are shown "Not trackted" -\> even I only run checkout.

Please Check this problem \^\^;

Thank you


Answers:
author: KieranA
body: Hi Donghoon Kim,

Could you clarify what's happening here? Files are only shown in the working tree if you've made changes to those files. Have you made changes to files in order for this to happen?

Cheers

comments: author: Donghoon Kim
body: Hi. Kieran.

I haven't make any changes.

Once just checkout, files and directory including Korean is shown "Not Tracked".

If you need any information, just let me know.


author: KieranA
body: Hi Donghoon,

Yes, these are untracked files which means you haven't added them to your repository but they're in your project folder. Typically you can't checkout to a folder with files in it, so it does seem odd. Are these files/folders tracked in your repository? Are they meant to be?
Sourcetree: Pull all tags
Asked by felixschulze:

It seems that SourceTree doesn't fetch moved tags. I must run a commandline and run

```
git fetch --tags
```

to get the correct tags.

Any idea or workaround for this?


Answers:
author: KieranA
body: Hi felix,

As you say, you'd have to do this via command line. Fetch isn't being that specific because it looks to me like you're pushing tag changes to a remote, which is amending a commit so all users would have to fetch --tags to see the tag changes made.

I've added this as a feature request to JIRA: <https://jira.atlassian.com/browse/SRCTREE-1437>


author: Gerry Tan
body: FYI the latest source tree (2.0.5.2) has "Fetch and store all tags locally" option in Fetch dialog box :)


Tags: git

tag
HTTP Authentication Fails
Asked by Nick Williams:

For some reason, I cannot get SourceTree to authenticate using vanilla HTTP authentication. It will work just fine if I point my browser to the URL and enter usernane/password when prompted. However, when I try the same procedure from SourceTree, I get at least two more repeated prompts for my username/password before it gives up and says it isn't a valid URL.

Any advice on things to try to sort thisout?


Answers:
author: KieranA
body: Hi Wilco. Could you post your URL format? (doesn't need to include actual paths)


author: Boris Berenberg
body: Is it an HTTP or HTTPS url?
"Error encountered" after setting up symlinks
Asked by AlecRust:

I've set up a couple symlinks within a repository (for example) mapping \`/src/static/scripts/\` to \`/src/Web/scripts/\`.

This works fine within the codebase and has the desired effect.

However, this seems to have messed up SourceTree and I'm getting the error:
> **Error encountered**'hg status' failed with code 255:'abort: path 'src/static/scripts/\<script-name\>.js' traverses symbolic link 'src/static/scripts'

I don't seem to be able to run any command since this error pops up as soon as the respository explorer is opened. Is there a command I can run to solve this (I assume re-indexing the repo)? I also notice that there's no way to run such commands from "Bookmarks".


Answers:
author: KieranA
body: It's a confusing error, probably one that could be more specific to the problem. Basically, src/static/scripts 'used' to be a directory and now isn't. So the error is correct, but not exactly helpful. I \*think\* the solution is to get rid of the symlink for that specific case. You should validate both paths are correct first. There's a good [discussion here](http://selenic.com/pipermail/mercurial/2010-September/034625.html) about it which may shed some more light on your problem in specific. The first question to ask is whether the linked directory exists and move from there based on that resource.

comments: author: AlecRust
body: Many thanks Kieran, that helped clear it up! I did indeed have to remove the symlinks from the repo (temporarily) to get this to work.


Tags: symbolic-link
Is there a way to sort the remote branches in descending order rather than ascending?
Asked by kakulukia:

we have a quite large repository and branches are named after their ticket numbers, thus the oldes branches will alway be on top and users have to scroll all the time.

Is there a way to change the sorting for the remote branches?

tis would be a nice option if not yet included!

best regards

Andy


Answers:
author: KieranA
body: Hi Andy,

There's an open issue relating to this on JIRA regarding the sorting of branches. You could provide extra feedback based on what's already said there to add your two-pence if you like? It's usually good to bundle related comments into issue, this might mean we provide a preference for sorting order on branches. Here's the issue: <https://jira.atlassian.com/browse/SRCTREE-988>

Cheers


author: kakulukia
body: thx
How can I increase the width of the diff view?
Asked by Joel Shapiro:

Hi,

SourceTree is cool, thanks.

When looking at diffs, how can I increase the width of the diff view? Currently, the diff window, created by SourceTree, is fixed in size. I can't see any way to increase its size, even though the outer window that contains it is much larger and has lots of room for the diff view to expand.

If a diff has lines more than about 80 columns in width, I can't see anything past 80 columns, nor can I make the diff window wider or scroll within it. This makes it very difficult to use SourceTree on files with lines wider than 80 columns, and sometimes such wide lines are unavoidable.

Do you have an ETA for a fix?

Thanks,

Joel


Answers:
author: KieranA
body: Hi Joel,

If you're referring to the following diff view, you can change the size of it as is shown in the below screenshot.

![](http://i.imgur.com/YngmlYp.png)

If I'm mistaken, could you provide more details of which diff view in particular?

Cheers

comments: author: karindpowell
body: I'd like a solution, too. I'm using SourceTree version 1.9.10.0

![mySourceTreeWindow.png](https://community.atlassian.com/t5/image/serverpage/image-id/916i3B14F5A4292DE378/image-size/large?v=v2&px=999 "mySourceTreeWindow.png")


Tags: diff

layout

windows