youngmon/atlassian-qna huggingface dataset:
Moving Bitbucket to Linux server with no internet access to update RPM repo for new GIT version
Asked by GSHerber:

We are moving our Bitbucket server back to linux, The new linux server has no internet access and the RPM repo for RHEL 7 has a very old version of GIT. We have the ability to download on a separate machine and move files to the server. How do we update the RPM repo with newer versions of GIT or somehow download a newer version of GIT to fix CVE-2022-41903, CVE-2022-23521?

As you could guess I'm not a linux person so any guidance is appreciated.


Answers:
author: GSHerber
body: What I did after some research was to download GIT 2.39.2 source package from GIT-SCM.ORG and build and install from source.


author: Aron Gombas _Midori_
body: There is a project that defines itself "Ia yum repository that provides newer versions of select software for RHEL and CentOS":

<https://ius.io/>

It seems that they provide fresh Git PRM's here:

<https://repo.ius.io/7/x86_64/packages/g/>

So download those, move to the target server, and install from RPM.


author: Erez Maadani
body: Hey [@GSHerber](/t5/user/viewprofilepage/user-id/2093058)

This link will help you setting up a local yum repo: <https://linuxhint.com/create-yum-local-repository/>

This way, you would be able to move the required RPM files to the new repo and installed them using yum command.

Hope that helps.


Tags: bitbucket-server

server
Request Workspace MFA status though API
Asked by Jos? Antonio Garcel D?az:

Hello, we are using Bitbucket Cloud and I'm needing to perform a check against the REST API to verify if the MFA is being enforced for members.

I supposed that the workspace detail endpoint would give me such info, but it didn't...

Any tips about this? Thanks!


Answers:
author: Syahrul
body: G'day, [@Jos? Antonio Garcel D?az](/t5/user/viewprofilepage/user-id/5152767)

We don't have an API endpoint to check whether a user has their 2SV enabled.

However, you can get an export of the user list on your workspace that has this information by going to your workspace settings \> User directory \> Export on the top right.

This will export the list of users in your workspace, including the data if they have 2SV enabled or not.

For more information, please check our documentation at:

[Export users](https://support.atlassian.com/bitbucket-cloud/docs/manage-your-plan-and-billing/#Export-a-list-of-workspace-members)

Cheers,  
Syahrul

comments: author: Jos? Antonio Garcel D?az
body: Hello [@Syahrul](/t5/user/viewprofilepage/user-id/744536)hanks for the reply :)

We'll consider the workaround you just provided.

Also, we just posted other question related to the API. Would you be able to guide us a bit please? Thank you.

<https://community.atlassian.com/t5/Bitbucket-questions/Recover-the-Default-Group-for-the-workspace/qaq-p/2280948#M90743>


Tags: bitbucket-cloud

cloud

multi-factor-authentication
Error when clicking "Import Repository"
Asked by Alex Kogan:

Hi,

I am having an intermittent issue when I click on "Import Repository" to import code from a legacy repo an error pages appears instead of the expected popup which would ask for the old repository URL. For me this is intermittent, for one of our developers this is consistent. The text from the error is pasted below. I recorded a few IDs as the issue is recurring

Something went wrong {#toc-hId--493658318}
------------------------------------------

While we check things on our end, try refreshing the page. If reloading the page doesn't help, check our [status page](https://status.bitbucket.org/) for known incidents or planned maintenance.

If you are still experiencing issues, our support team can be reached via StatusPage. Use the code below when reporting your issue, this will help the team look up details of what went wrong:

`5b3aa3e5fa0f4c28965f6476a36b4ee2`

fcf9035a0a8749afa662be403fd47883

574c09a127274002af39e57effb00c7e

66b4994239634a4aac6c44557e6e33ea \<- latest

`Thanks`


Answers:
author: Theodora Boudale
body: Hi Alex!

I think you may be coming across the following bug:

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

Can you please try the following workaround mentioned in that bug report and let me know if that works for you?

Import a repository by going to the specific workspace instead:

1. Go to the workspace - <https://bitbucket.org/worksspace_id>
2. Click the **Create** dropdown and select **Repository**
3. Click **Import repository**

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to use Git-LFS with a self hosted mac runner?
Asked by Justin Saler:

Hello.

I have a self-hosted mac runner with git-lfs installed. The repo uses Git-LFS. I have defined two pipelines

```
Get Repository:
 - step: 
   name: 'Get Repository'
   clone:
     lfs: true
     enabled: true
   script:
     - chmod +x ./scripts/buildScript.sh
     - ./scripts/buildScript.sh
   runs-on:
      - 'self.hosted'
      - 'macos
Test Git LFS:
  - step:    
    name: 'Test Git LFS'
    clone:
      lfs: false
      enabled: false
    script:
      - git lfs
      - git-lfs
runs-on:
  - 'self.hosted'
  - 'macos
```

The second pipeline is able to run git-lfs and print out information, but the first pipeline fails during "Build Setup" with the following information:

![Screenshot 2023-02-21 at 16.32.02.png](/t5/image/serverpage/image-id/241469i74E7551BD8E8204D/image-size/large?v=v2&px=999 "Screenshot 2023-02-21 at 16.32.02.png")

So for some reason Git LFS works in a step, but not in the build setup.

For context, the mac runner has installed Git-LFS using Brew and I add Brew to the path in .bashrc using

```
eval "$(/opt/homebrew/bin/brew shellenv)"
```

What should I do to be able to use clone lfs: true? Is there any other file I should add the brew path? Should i install git-lfs some other way on the runner?


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

I am not able to reproduce the error you get with a configuration as your first step in the bitbucket-pipelines.yml file.

Could you please provide some additional info, so I can better help you?

**1.** What output do you get if you run **git lfs install** on a terminal on this Mac?

**2.** What is the version of Git LFS on this Mac? You can run **git lfs version** to find out.

**3.** Does this MacOS meet the minimum requirements for Runners below:

* OpenJDK 11 (11.0.11 or newer) is installed
* Git 2.35.0 and above
* A 64-Bit MacOS instance with at least 8GB of RAM as a host for the runner.
* MacOS Catalina 10.15+

**4.** Can you check the runner log and find entries at the time that this particular step failed and post them here (after sanitizing any private/sensitive data)?

**5.** What is the version of the Runner you are using? This should be in the Pipelines build log, in the first section, **Runner**.

Kind regards,  
Theodora

comments: author: Theodora Boudale
body: A quick note I forgot to mention about question 4.:

The runner log should be located at  

    ~/atlassian-bitbucket-pipelines-runner/temp/b609961f-891e-c872-c36b-f3f2c315d186/runner.log

where

* `atlassian-bitbucket-pipelines-runner is the directory where you unzipped the runner zip`
* `b609961f-891e-c872-c36b-f3f2c315d186 is the UUID of the runner, this should have the value of your own runner's UUID`


Tags: bitbucket-cloud

cloud
need GC run on server (repository is over 2 GB, BFG tool does not help)
Asked by stargazer33:

For one of my repositories I got a "...repository is over 2 GB" warning.  
I used BFG tool on "bare reposotory", than pushed the results back into bitbucket (by the way, the "bare reposotory" is about 28MB, not 2GB!)  
Still I see the "Repository size=2.02 GB"

Would somebody please run gc on bitbucket server?

Repositry URL: \<redacted\>

<br />

thanks in advance!  
Dmitri  

UPDATE:  
here the result of "git count-objects -Hv" on local (bare) repository:  

```

count: 0
size: 0 bytes
in-pack: 76672
packs: 3
size-pack: 24.78 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
```


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

I have triggered Git GC on the affected repository, and the size has been reduced to 24 MB.

Could you please review it and let me know how it goes?

I hope this helps.

Cheers,  
Syahrul

comments: author: stargazer33
body: Excellent! Many thanks!

Just for my understanding:  
I know this repository will grow with the time.  
From my side - I can run BFG and "git gc" from time to time.

<br />

**What else I can do to prevent gigabyte-size of the repository?**


author: Syahrul
body: G'day [@stargazer33](/t5/user/viewprofilepage/user-id/1685252)

Thanks for the update

Essentially repository size increase over time is normal. However, if the size increase happens overnight, the issue is likely because a user pushes large binary files into the repository.

You can use gitignore to ignore specific file patterns etc to prevent the accidental push of large files into the repository.

Sample gitignore to ignore a specific file pattern; <https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring>

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud

git

repository
Graph for All Branches
Asked by Silas Forkel:

Hi!  
Is there a way to get a **graph on all branches**like it is on the single commits?

We used Bitbucket Server with CommitGraph and it worked very well. In BC they configured the graph for commits but not for the branch- view.  
The free Add-On GitFlowChart has similiar graphs but works pretty slow and still has alot of bugs. Is there any alternative to get a graph like in the attachements for the branches?

Thx in advance!

![2023-02-21 13_58_31-01-commit-graph.png (PNG-Grafik, 1128???627 Pixel) ? Mozilla Firefox.png](https://community.atlassian.com/t5/image/serverpage/image-id/241396iCE71302B2DEDB2E5/image-size/large?v=v2&px=999 "2023-02-21 13_58_31-01-commit-graph.png (PNG-Grafik, 1128???627 Pixel) ? Mozilla Firefox.png")


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

A graph like this will all branches is available on the **Commits** page of a Bitbucket Cloud repo. Other than Git Flow Chart, I don't see any other add-on that shows graphs.

I'm not really sure what you mean that the graph is not configured for the branch view, are you referring to the **Branches** page of the repo on a Bitbucket Cloud repository? Could you please explain how is the graph we show on the Commits page of a repo different from what you are looking for?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
I sent a webhook from Bitbucket to Bamboo On Demand, but I get a 401 error.
Asked by ???SA:

Hi there

I tried it through this [url](https://confluence.atlassian.com/bamboo/trigger-a-bamboo-build-from-bitbucket-cloud-using-webhooks-873949130.html)

I get a 401 error. Works well with postman, but not with webhook

The difference between postman and webhook is that you can't add an authentication value to the header.

401 error content at the bottom

```
`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>401</status-code><message>Client must be authenticated to access this resource.</message></status>`
```

how to solve this problem.

thks.


Answers:
author: Theodora Boudale
body: Hi [@???SA](/t5/user/viewprofilepage/user-id/5152256),

It is indeed not possible to provide authentication details in a Bitbucket Cloud webhook.

You can check the suggestion in the following post:

* <https://community.atlassian.com/t5/Bamboo-questions/Trigger-bamboo-from-bitbucket-Webhooks/qaq-p/1138412>

The error message is slightly different that yours, but it is still related to authentication, and the suggestion may help.

If it doesn't, I would suggest that you post your question on the Bamboo product forum as well:

<https://community.atlassian.com/t5/Bamboo/ct-p/bamboo>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
redmine with bitbucket
Asked by ???:

hi   

Is there a detailed guide to integrating redmine and bitbucket with docker?


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@???](/t5/user/viewprofilepage/user-id/5152158) and welcome,

did u try the following approach <https://confluence.atlassian.com/confeval/development-tools-evaluator-resources/bitbucket/bitbucket-can-i-integrate-bitbucket-with-redmine> ?

Fabio


Tags: bitbucket-cloud

cloud

docker

redmine
Can only log in as the wrong user
Asked by danielklein_hmrreferrals:

I'm trying to push some code to Bitbucket. It has logged me in as someone else and won't let me change to my user. I've tried logging out, and also completely deleting the OAuth token in Sourcetree, but every time I refresh the token it logs me in as the same wrong user as before.

I've had to use a different browser just to ask this question because my regular browser also will only let me log in as the wrong user.

How can I log in as myself?


Answers:
author: danielklein_hmrreferrals
body: I managed to log in as the wrong user, revoke the token, log in as myself, then the OAuth token got set correctly.


Tags: bitbucket-cloud

cloud
not receiving email to finish enabling two-step verification.
Asked by ???:

I reinstalled the two-step verification app. Now trying to enable it. but not receiving email to finish enabling two-step verification.


Answers:
author: Patrik S
body: Hey [@???](/t5/user/viewprofilepage/user-id/5152158) ,

Welcome to Atlassian Community!

I found that your e-mail was on our suppression list. This usually happens when our servers attempt to send the e-mail message, but the recipient server is not able to correctly deliver it, so we add the e-mail address to a suppression list.

I went ahead and removed the e-mail from the suppression list. You can try enabling 2FA again and the email should be correctly delivered now.

Let me know in case you have any questions.

Thank you, [@???](/t5/user/viewprofilepage/user-id/5152158) !

Patrik S


Tags: bitbucket-cloud

cloud
How to give access to deploy to environment without giving admin permissions
Asked by Mohammad Imran Ansari:

Hello everyone,

I want to get some insights and ways to learn about ways to give access to Leads to deploy to a specific environment without giving admin permissions.

Currently its only possible for admins to deploy to a specific environment that too if restricted from the deployments page.

Thanks in advance


Answers:
author: Patrik S
body: Hello [@Mohammad Imran Ansari](/t5/user/viewprofilepage/user-id/5135481) ,

Currently, the [deployment permissions](https://bitbucket.org/blog/deployment-permissions-now-available-in-bitbucket-pipelines) feature just provides the option to only allow admins to deploy to a given environment - if that option is not enabled any user of the workspace will be able to deploy to that environment.

We do have a feature request to expand the functionality of deployment permissions and allow custom non-admin users to be added to the groups of users allowed to deploy to an environment. This feature request is being tracked in the following ticket:

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

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

Thank you, [@Mohammad Imran Ansari](/t5/user/viewprofilepage/user-id/5135481)

Patrik S


author: Riley Venable
body: You can set environment specific deployment variables and restrict the ability to deploy to admins, or to specific branches. You can also restrict pull requests to certain branches.

comments: author: Mohammad Imran Ansari
body: Thank you [@Riley Venable](/t5/user/viewprofilepage/user-id/4584007) Can you please share some refrences or documents where i can to that , As i mentioned I dont want admins to deploy, I want a user without admin access to get the option to deploy to a environment


author: Riley Venable
body: You can use deployment variables with permissions to make sure only the branches or people you want to deploy. You can find more information about this in the documentation here: [https://support.atlassian.com/provisioning-users/docs/configure-user-provisioning/](http://You%20can use deployment variables with permissions to make sure only the branches or people you want to deploy. You can find more information about this in the documentation here: https://support.atlassian.com/provisioning-users/docs/configure-user-provisioning/)


Tags: bitbucket-cloud

cloud
Is there a way to do a merge from one branch to another but file-by-file?
Asked by roam_scott:

I have two branches that have diverged. I need to merge \*most\* of /master into the new branch but not all of it. I tried "Merge master into current branch" but it, of course, overwrote files I didn't want it to. I'm hoping to find some sort of "manual-but-not-manual merge" where it would prompt me for each change and I could step through and select which ones to merge.

I can do this in WinMerge (and have been) but it takes a LONG time to generate the diff.

Does SourceTree have anything like this?


Answers:
author: minnsey
body: Hi  

It depends if your file changes are cleanly encapsulated by atomic single file commits.  

If they are then you could use either cherry-picking, if you want history, or patch files, if history doesn't matter. Either of which can be done in Sourcetree.  

If they aren't then I think you are in to the world of rebasing. The following gives some pointers <https://stackoverflow.com/a/449632>. Sourcetree can help with this, but you may well find it easier to follow the examples using the command line.


Tags: git
I am not ale to do pull request using sourcetree
Asked by tanmoyc05:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin  
fatal: HttpRequestException encountered.  
An error occurred while sending the request.

remote: Empty password


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

In your message we can see the error is that Sourcetree doesn't have the password to your remote. You can solve this by following the steps at [Connect your Bitbucket or Github account](https://confluence.atlassian.com/get-started-with-sourcetree/connect-your-bitbucket-or-github-account-847359096.html)

If after that you're still having issues, please answer these questions:

1. Can you attempt another pull request? What error message do you get this time?
2. Are you using Windows or Mac?
3. Have you tried the command line? Do you get any error?
4. Can you perform any other operations to that repo?

Let us know!

Ana
Two bugs After sourcetree restart
Asked by JackChow:

Hello!

I use SourceTree-2.6.10 Chinese simplified version in Win7 x64

When I use sourcetree tools, I find two bugs after it restart.

1?When I just installed the sourcetree, I can log in normally and view the remote repos. But if I restart sourcetree, it doesn't show my account in the location as the Snapshot. It causes I can't get the remote repos in the GUI. This is Chinese simplified version, it means "Remote Repos"?"Add a account/user"?"Edit account/User"![QQ??20180817175226.png](/t5/image/serverpage/image-id/29829i48873AEB83CDC5BA/image-size/large?v=v2&px=999 "QQ??20180817175226.png")

If I click the "Add a User" button, input my account again, it shows me "the account has been existed" , I can't click the confim button.

2?When I cancel selection the settings "Allow sourcetree to modify my global git and mercurial configuiration files" in "Tools =\> Option =\> General", it will be effective. But when I restart the sourcetree, it will be selected again.

Who can help me to solve these problems?


Answers:
author: Mike Corsaro
body: Hello! Sourcetree stores user accounts in the following location:

```
C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\accounts.json
```

Could you verify the contents of that file after adding an account, and see what happens to it after restarting Sourcetree? It's possible that account settings or a anti-virus is preventing that file from being modified.


Tags: windows
How can I display the project list in left hand side?
Asked by James Ma:

I have been using SourceTree in Windows 7 for years, and just reinstall everything in Windows 10, and the SourceTree has been upgraded.

It seems that the project list in left-hand side is not opened by default, but I can't find which option can display it back. As I have over 30 projects created (over 10 of them are active), the tab header without grouping is completely useless. I have to press the "+" button to get the folder view to search the project, which is very inefficient. The project list with grouping in left hand side can save much time in searching a project.

May I know how I can turn on the project list in left hand side?  
Thanks a lot.


Answers:
author: minnsey
body: Hi  

The sidebar listing the repositories was removed in v2.0.  

However we are looking at this area again, see <https://community.atlassian.com/t5/Sourcetree-discussions/dev-team-Proposed-Sidebar-Replacement-for-Windows/td-p/802582>


Tags: windows
Is it possible for a remote repo to store files with their original format?
Asked by Yordan Ramshev:

I want to find a way for my bare repository (which acts as my remote that I host on my own server computer) to store the actual working files as a working file, not the compressed version when I push them in.


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

This question is not about any Atlassian product, but about how Git works. If you want actual working files, then you need a working repo, not a bare one:
> **What is the difference between a repository created using the `git init` command and the `git init --bare` command?**
>
> Repositories created with the `git init` command are called working directories.
>
> Repositories created with `git init --bare` are called bare repos. They contain no working or checked out copy of your source files. They store git revision history of your repo in the root folder of your repository instead of in a .git subfolder.
>
> **Why use one or the other?**
>
> Well, a working repository created with `git init` is for... **working** . It is where you will actually edit, add and delete files and `git commit` to save your changes.
>
> A bare repository created with `git init --bare` is for... **sharing**.

I extracted that definition from [What is a bare Git repository](http://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/), I recommend reading the full article for a better understanding.

Hope that helps!

Ana


Tags: git