youngmon/atlassian-qna huggingface dataset:
Build Docker image with git submodule
Asked by rchernigovskikh:

I have ASP NET Core project referring to my library using git submodules.

Project structure:  
-Project Folder:

---DockerFile

---MY_APP:

------MY_APP.csproj

---MY_SUBMODULE

------MY_SUBMODULE.csproj

---MY_APP.sln

My Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env  
WORKDIR /app

COPY . ./  
RUN dotnet publish MY_APP-c Release -o publish

FROM mcr.microsoft.com/dotnet/aspnet:5.0  
WORKDIR /app  
COPY --from=build-env /app/publish .

ENTRYPOINT \["dotnet", "MY_APP.dll"\]  

My pipelines file:  
image: mcr.microsoft.com/dotnet/sdk:5.0  

pipelines:  
default:  
- step:  
name: Update submodules  
script:  
- apt-get update  
- apt-get install --yes openssh-client  
- git submodule update --init --recursive  
- step:  
name: Build and push  
caches:  
- dotnetcore  
- docker  
script:  
- docker build -f Dockerfile -t IMAGENAME .

....  
services:  
- docker  
- step:  
name: Deploy to server branch develop  
.....

On my local machine all is going well, but build with pipelines throws an error:  
Skipping project "/app/MY_SUBMODULE/MY_SUBMODULE.csproj" because it was not found. I guess I have some problems with submodules files.

Step with submodule update does well, but i don't see that it uses path Cloning into '/opt/atlassian/pipelines/agent/build/MY_SUBMODULE'...

`So, what is a proper way to build docker image inside bitbucket pipeline on a project with submodules?`


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

I believe the culprit might be that the submodule is updated in a different step than the one that builds the Docker image.

Just to give you some context: for every step in a Pipelines build, a Docker container starts. The repo is cloned in that container, the commands of that step's script run, and then the container gets destroyed. Then, another container starts for the second step etc.

If files are generated or downloaded in a certain step, they won't be available to the next steps unless they are defined as [artifacts](https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/). In your specific example, the submodule directory is empty until you run the command **git submodule update --init --recursive**, so the data is fetched during this first step. After this command, the build container for that step gets destroyed. A new container will then start for the second step, with a fresh clone, so the submodule data that was fetched in the previous step won't be available.

If you combine the first and second steps into one, the submodule files should be available in the build's clone directory when you build your Docker image.

Kind regards,  
Theodora

comments: author: rchernigovskikh
body: Thanks for help!


Tags: atl-gruland

bitbucket-pipelines
Bitbucket Cloud - yet another commit checker
Asked by angelaaa:

Hey all,

We want to migrate our bitbucket server to use bitbucket cloud.

we currently use the "yet another commit checker" plugin to attach commits to Jira tickets.

We want to save this option after the migration,

This plugin seems to be available only on the server/Data-center.

Is there another plugin that is similar? or is It built in?

Thanks.


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Bitbucket Cloud would need a pre-commit checker to validate references to Jira tickets - <https://jira.atlassian.com/browse/BCLOUD-10471>

Please vote!

[@Shana](/t5/user/viewprofilepage/user-id/1549938) can you advice on a timeline when this check will be available?

Thanks, Ulrich

comments: author: angelaaa
body: Voted!

thanks.


author: julio_sanchez
body: Hello, good day. Has anyone found something similar?


Tags: app

bitbucket-cloud

cloud

commit
Issue with connection to kuberntes cluster
Asked by Kalpana Seelam:

1. Hi, has anyone faced an connection issue while connecting to minikube kubernetes cluster from pipeline. I have provided base 64 encoding of my kube config file I got from executing minikube config on the server (and replaced the server ip with public ip, I see the certificate and token details in the config) and set it in the bitbucket variable and getting connection timed out. Can someone provide solution for this.


Answers:
author: Igor Stoyanov
body: [@Kalpana Seelam](/t5/user/viewprofilepage/user-id/4633745) hi. Have you tried this one? <https://support.atlassian.com/bitbucket-cloud/docs/deploy-to-kubernetes/>

Regards, Igor


Tags: bitbucket-pipelines

cloud

kubernetes
Bitbucket is ending support for the Services feature
Asked by vipulpambhar:

Hello,  

Hope you are doing well!  

We have received below mail recently from atlassian.com.  
--------------  
We noticed you are an admin for a Bitbucket Cloud repository that is still utilizing our original Services feature. We had previously announced that we will end support for this feature and recommended migrating repositories to Bitbucket webhooks.  
Bitbucket is officially ending support of the Services feature on 31 December 2021. In order to prevent any unforeseen issues we recommend migrating at once. If you have any questions or issues migrating to Bitbucket webhooks, please reach out to Bitbucket support.  
-------------  

So we need to clear below points before take any action for it.

1. Is it mandatory to migrating repositories to Bitbucket webhooks. ?

2. If I don't want to migrate this repository, Then automatically my repositories are migrated by atlassian or Bitbucket servie will be stop on 31 December 2021 ?

<br />

Thanks for all your help and support in advance:)  

Best,  
-Vipul  


Answers:
author: Theodora Boudale
body: Hi Vipul and welcome to the community!
> 1. Is it mandatory to migrating repositories to Bitbucket webhooks. ?

It is not mandatory to migrate any services functionality to webhooks. We are asking admins to migrate any services functionality to webhooks if they want to keep this functionality. However, it is mandatory.
> 2. If I don't want to migrate this repository, Then automatically my repositories are migrated by atlassian or Bitbucket servie will be stop on 31 December 2021 ?

Any services functionality will stop on 31 December 2021, we will not convert any existing services functionality to webhook from our side.

Please note that the services functionality we are deprecating is not related to Pipelines services. I just wanted to clarify this because some users thought we are deprecating Bitbucket Pipelines services, which is not the case.

The Services feature we are deprecating is available from **Repository settings** of a repo, but only for older repos that already have services set up. If you want to find which of your repos have such services set up, you can use the following API call:

```
https://api.bitbucket.org/2.0/repositories/{workspace}/?fields=values.services.*.*.*,values.full_name&role=admin
```

Replace **{workspace}** with the workspace-id of the workspace that owns your repos. After you get the repositories with services with this API call, you can open each repo on Bitbucket website, navigate to its **Repository settings** and you'll see an option **Services**.

You can also find more details in the following community article (and the first comment on this article):

* <https://community.atlassian.com/t5/Bitbucket-articles/Email-about-ending-Bitbucket-Services-feature/ba-p/1853515>

If you have any other questions, please feel free to let us know!

Kind regards,  
Theodora


Tags: bitbucket-cloud
is my email address "<email_removed>" on suppression list
Asked by Igor Zincenko:

I have private bitbucket repositories shared with my but i have never got any emails from bitbucket. I have seen over people having same issue and sounds like email might be on suppression list. could you please check and remove my email from that list. otherwise i'm not able to access git repositories on bitbucket, also unable to reset password

thank you

Igor Zincenko

\<email_removed\>


Answers:
author: Theodora Boudale
body: Hi [@Igor Zincenko](/t5/user/viewprofilepage/user-id/4633695),

Your email address was indeed in a suppression list, so I went ahead and removed it.

If there were any Bitbucket invitations sent to your email address, can you please ask one of the admins to resend them? A new invitation needs to be sent, as the previous ones were dropped.

You will also need to request a new password reset email now via <https://id.atlassian.com/login/resetpassword> for the same reason.

Just a heads up, I removed your email address from your post to protect your privacy.

Please feel free to let me know if things are ok now and if you need anything further.

Kind regards,  
Theodora


Tags: bitbucket-cloud
I can't connect bitbucket to VS Code through Jira and Bitbucket plugin (Atlassian Labs)
Asked by Andre Oliveira:

#### I'm using Jira and Bitbucket plugin, but when I sign in Bitbucket I got an error with code 401.
I didn't find specific information in the documentation.
Would anyone know how to connect the Bitbucket in the VS Code and exactly the input values for the connection through ADD CUSTOM BITBUCKET SITE?
I need to make a pull request through the existing resources in this plugin.
Thank you very much if anyone can help. {#toc-hId--509426707}


Answers:
author: Caroline R
body: Hi, [@Andre Oliveira](/t5/user/viewprofilepage/user-id/4633625)! Welcome to the community!

Could you please confirm if you are trying to connect a Bitbucket Cloud or Server account with VS Code?

The following documentation shows how you can authenticate the VS Code extension with Jira and Bitbucket (both Cloud and Server):

* <https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-vs-code/>

As you can see there, the **Add Custom Bitbucket Site** is for Bitbucket Server, so in case you are trying to connect a Bitbucket Cloud account, you should select the other option, **Login to Bitbucket Cloud**.

I hope this helps, but please let me know if you have any questions.

Kind regards,  
Caroline

comments: author: Andre Oliveira
body: Thank you so much, Caroline.


author: Caroline R
body: I'm glad to help, Andre! :)

Kind regards,  
Caroline


author: Andries van Wyk
body: Hi, I am having the same issue, but the link above does not resolve my issue.  
When I sign into a custom bit bucket site, I get a 401 error. Sometimes, the 'sign in' button is greyed out as well.

comments: author: Dinesh Loyapalli
body: Hi Andries,

I am also facing the same issue. If you have fixed this issue, can you please let me know how you did it?

Thanks!


author: Andries van Wyk
body: no luck sorry and our IT is being absolutely unsupportive. So we are not using it, sadly.
AWS CodeBuild suddenly can't see my private repository
Asked by Peter Deppe:

Hello! I have private Bitbucket repositories connected to AWS Codebuild using Codestar. Up to this point, everything has been working fine but all of a sudden this morning the builds are failing indicating it can no longer see the source.

When I click the url from AWS it brings me to Bitbucket but the code is not visible and provides the following message:
> "Having trouble showing that file"
>
> "Normally, you'd see the file here, but something didn't go right"

It appears AWS is using a url formatted like:

```
 https://<USERNAME>@bitbucket.org/<WORKSPACE>/<PROJECT-NAME>/src/main
```

I cannot get this to work at all. However, I'm logged in to Bitbucket and can hit this url just fine:

```
https://bitbucket.org/<WORKSPACE>/<PROJECT-NAME>/src/main
```

Anyone seeing the same issue? Ideas?


Answers:
author: Peter Deppe
body: Sigh. Ok, nvm. The message I was seeing in the AWS console was:

```
Phase complete: DOWNLOAD_SOURCE State: FAILED
```

I read that as having an issue with the source so went down that rabbit hole. I wasn't paying close enough attention because it turns out there was a problem with the buildspec.yaml that was failing the build :(

The link to the codebase in the context of the CodBuild process appears to be working fine.

My bad :(


Tags: aws

bitbucket-cloud

cloud
Can't access a public facing project / repo
Asked by James Maljaars:

I can't access the public facing project / repo I made (when signed out). It says

##### "Having trouble showing that file {#toc-hId-1988568056}

Normally, you'd see the file here, but something didn't go right."

The URL : \<link removed due to privacy reasons\>

Thanks,

James


Answers:
author: Caroline R
body: Hi, [@James Maljaars](/t5/user/viewprofilepage/user-id/4633511)! Welcome to the community!

Thank you for reaching out to Atlassian Community!

Indeed, when trying to access the link you shared with us, I receive the same error message. However, if I add a slash (/) to the URL, I can load the repository normally. Could you please test this and let me know how it goes?

Kind regards,  
Caroline

comments: author: James Maljaars
body: This works! It worked without the "/" at the end of the URL initially but now it needs it. Kind of strange but maybe that's been updated.


author: Caroline R
body: Hi, James!

Thanks for your confirmation, I'm glad to know it worked!  
Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Version Compare
Asked by Viswajith Karapoondinott:

I am trying to compare a particular feature's commit against a new feature commit. But this is giving me a comparison of the first feature's original branch against the new feature commit. I tried adding a commit tag but it is not giving correct results.


Answers:
author: Aron Gombas _Midori_
body: What do you mean by comparing a commit against another one?

Maybe the easiest would be to get the diff for the two commits (that basically capture what was changed as part of that commit) and then compare the diffs?
SourceTree Mac app and Beanstalk
Asked by Eimantas Kateiva:

Hello,

is it possible to add Beanstalk repositories into SourceTree?

Beacause I can see only four option to clone remote repository (Bitbucket, Github, Kiln, Stash)


Answers:
author: Seth
body: You just have to put the repository URL directly into the box there. The hosted repository feature (where you see that list) is just a convenience feature to make cloning from those providers a little easier.

![](../../upfiles/Capture_179.PNG)


Tags: beanstalk
Sourcetree: Git Log Failed
Asked by studiovo:

I keep getting this failure message multiple times a day (for Mac, Version 1.8.1 ):

'git log' failed with code 128:'error: unable to open object pack directory: .git/objects/pack: Too many open files in system

fatal: faled to read object xxx: Too many open files in system

I have it set up so that my repo's don't automatically check for updates (I have over 30), and I try to only keep 4 or 5 repos open at any given time. Still I get this error. Help!?


Answers:
author: Seth
body: That error means there are too many open files in your entire OS, not just SourceTree. This includes files in use by browsers, Adobe Reader, office software, code editor, etc. Check out this answer from superuser.com:

<http://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1>


author: Viorel Lupu
body: Running **`git gc`** solved it for me.
How to select multiple files in SourceTree commit on Mac?
Asked by Mikko Lakomaa:

So on Windows I can just select files and hit space to select them, but on Mac this just brings up Preview for the first file. I'm using a Mercurial repo so I can't just drag them to staging.

Is there a keyboard shortcut to select the checkbox for multiple files in the Mac version of SourceTree? Also is there a list of keyboard shortcuts somewhere?


Answers:
author: Adrian von Gegerfelt
body: It used to be shift-click or cmd-click, but now selecting multiple doesn't enable you to commit or discard multiple files!

comments: author: Jason Boehle
body: Yes, it's really ridiculous they removed this feature. I am going to have to find a new Mercurial GUI for Mac.


author: Jeff Thomas
body: I turned on [full keyboard access](http://support.apple.com/kb/PH10711) and was able to select one file at a time with Option + Space. I know that's not exactly what you're looking for, but maybe it will get you started.


Tags: mac
Can I make my own "Checkout in SourceTree link"?
Asked by Valerie Wagner:

Hello, I manage Hg and Git repos at my organization. Is it possible for me to craft a link or button to "Checkout (repository) in SourceTree" like is available on BitBucket? I'd like to make this kind of link available for my users from our internal web page.


Answers:
author: Seth
body: Yes. The target of your link should use the sourcetree protocol with cloneRepo and the repo URL. For example, "sourcetree://cloneRepo/ssh://user@bitbucket.org/owner/repo.git". Everything from "ssh" forward should be replaced with your repository's URL.

comments: author: Seth
body: If you use bitbucket's "checkout in sourcetree" button in Google Chrome, the confirmation dialog shows you the whole link that it is attempting to launch.

Here is the relevant section from the 1.4 release notes:

* **Custom URL protocol support** - SourceTree will now respond to URLs of the form "sourcetree://cloneRepo/\<CLONE_URL\>" so websites can expose clickable links to clone in SourceTree. Also SourceTree will optionally handle github-mac:// URLs if GitHub for Mac isn't installed (or if the user sets Preferences to prefer SourceTree).


author: Valerie Wagner
body: Thanks, that is super helpful!


author: GD
body: Is it possible to open sourcetree repository at a specified commit ?
Force detection of specific repository type when connecting to Kiln repository over SSH
Asked by CraigTP:

I'm using SourceTree on Windows to connect to a repository hosted on [KilnHG.com](http://KilnHG.com)and my connections are over SSH.

Kiln, as you may be aware, allows repositories to exist as both Git and Mercurial repositories.

When Kiln shows the SSH URI to use to clone the repository, this URI does not change between Git or Mercurial versions of the repo. (Strangely, when accessing the repo over HTTPS, the URI does change - The Git version has ".git" at the end of the URI whereas the Hg version has nothing).

When I enter the SSH URI into SourceTree's "Clone Repository" dialog, SourceTree attempts to detect the repository type. This always comes back with the Git Repository, never the Mercurial one.

As far as I know, there's no way to override SourceTree's behaviour here and tell it to clone the Mercurial version instead.

Is there any way I can force SourceTree to clone the Mercurial Repository or otherwise override SourceTree's "detection" of the repository type?

(For the record, if I use hg or git from the command line with the same SSH URI, I can successfully clone the correct repository of the correct type).


Answers:
author: stevestreeting
body: Hmm, when I reviewed Kiln's dual git/hg features I thought we were OK because of the .git extension (SourceTree actually cheats if it sees the .git suffix and short-circuits the normal probing). Perhaps it's changed since I last tried it but it sounds like now the non-.git suffixed URL reports success for both 'hg id' and 'git ls-remote', which would explain why it's identifying as git. We parallelise the probe requests, but git tends to be marginally faster than hg so it will win.

Since this is so specific to Kiln it's unlikely that we'd put a force optino in here just for this case (our designer is being strict about not adding new controls unless needed), all I can really suggest is that you do the initial clone on the command line. Sucks I know, but this is such an edge case I'm not sure we can justify anything more.

comments: author: CraigTP
body: Thanks for the answer Steve. Your suggested workaround is exactly what I've been doing so far. I appreciate that this is currently a fairly edge case and I also understand your designer's reluctance to add further buttons and controls to the already fairly busy (but necessary) UI. Just glad to know I'm not overlooking something obvious.


author: Seth
body: I don't know how it works under the hood, but maybe Atlassian could resolve it by adding Kiln to the hosted repositories list and doing setting that configuration to try Hg first.
Installing Source Tree in a Citrix Environment
Asked by Nomar Morado:

Hi,

we are trying to install latest sourcetree on our citrix environment.

**details of the environment:**

OS: Windows 2008

Citrix Xenapp 65

We have successfully installed the app, but when launching it for the first time we are getting: **SourceTree: Git not found**

Can you please let us know what we might be missing here?

Thank you!

Nomar


Answers:
author: Jacob Daubendiek
body: Were you able to install Sourcetree in Citrix. We are looking into doing the same as we have a lot of offsite developers.


author: Foong
body: Hi Nomar,

By default, SourceTree will try to use your local Git command-line client installed. If you does not have any other Git client installed, you will need to set SourceTree to download its embedded Git.
Configure Source Tree to disable update checks
Asked by Matti P??rni:

Is there a way to disable the automatic update checks in Atlassian SourceTree in windows and which configuration paramterers are controlling that feature?

We work in an environment where all software needs to be certified, so we can't automatically update software. It needs to go through our certification process and then we will push the updates to all clients.

Best Regards,

Matti P??rni


Answers:
author: Foong
body: Hi Matti,

There isn't any option to disable the automatic update in SourceTree Windows yet. Please refer to [](https://jira.atlassian.com/browse/SRCTREEWIN-2084)<https://jira.atlassian.com/browse/SRCTREEWIN-2084>

comments: author: Elliander Eldridge
body: For those of us who cannot install .NET 4.7, what would happen if it tried to auto update anyway? Would everything just break? Couldn't we just remove or rename the Update.exe file as a workaround?


Tags: automation

update

windows
I've added an SSH Key, however it keeps saying "bad passphrase"
Asked by Martijn Jonker:

As the title says I added an SSH Key and upon entering my password (correctly I might add) it keeps saying "bad passphrase". I'm really confused as to why this is because I can login to SSH fine using the same publickey.


Answers:
author: Martijn Jonker
body: I'm stupid, had to use private key.


Tags: key

password

ssh
I wan to delete a registered host, github, but I do not know how to...
Asked by Andy:

...and keep on getting an annoying pop asking me to authenticate a [github.com](http://github.com)that no longer exits


Answers:
author: Andy
body: Well I sorted it out for myself, finally! View\>Show Hosted Repositories...Edit Accounts (button on right). Then delete. Obvious when done but not as a newbie. Cheers
add git command to source tree
Asked by Sanjeev Kumar:

I want to know how can I add my custom git command to source tree toolbar, that sends color diff through email and pushes the latest commit to remote repository !!


Answers:
author: Seth
body: I don't believe there is any way to modify SourceTree's toolbar.

Maybe you already did this, but you can put your command into SourceTree's "Custom Actions" feature, and it will show up in the context menu (right-click menu).


Tags: git