youngmon/atlassian-qna huggingface dataset:
pipe.yml - private docker registry
Asked by szumak:

Hello,

I am trying to understand how the customized pipelines works. Ther problem I am facing is that I am unable to set the access credentials to access my private docker registry in the **pipe.yml** file.

I have my pipe build in a \`pipeline-alfa\` repository. The **pipe.yml** contains:

```
name: My pipeline-alfa
image:
  name: registry.my-registry.com/pipeline-alfa:latest
  username: basic-auth-user
  password: ***basic-auth-pass****
  email: user@foo.com
category: Utilities
description: Showing how easy is to make pipes for Bitbucket Pipelines.
variables:
  - name: ENV_NAME
    default: ?myProduction?
repository: https://bitbucket.org/foo/pipeline-alfa
maintainer:
  name: user
  website: https://foo.com
  email: contact@foo.com
vendor:
  name: Demo
  website: https://example.com/
  email: contact@example.com
tags:
  - helloworld
  - example
```

I am running this pipeline from my \`repository-main\` as follows:

```
...
'**':
   - step:
      script:
        - pipe: foo/pipeline-alfa:1.0.6
```

I can see that this work as expected. The **pipe.yml** from the *pipeline-alfa*repository is picked and on my private docker registry host I can see (nignx access log):

```

xx.xx.xx.xx - - [27/Jul/2022:19:15:02 -0400] "GET /v2/ HTTP/1.1" 401 188 "-" "docker/20.10.15 go/go1.17.9 git-commit/4122ba1 kernel/5.10.101 os/linux arch/amd64 UpstreamClient(Docker-Client/20.10.15 \x5C(linux\x5C))"

```

bitbucket pipeline run log is saying:

    ...
    Unable to find image 'registry.my-registry.com/pipeline-alfa:latest' locally
    docker: Error response from daemon: Head "https://registry.szumski.xyz/v2/pipeline-alfa/manifests/latest": no basic auth credentials.
    See 'docker run --help'.

- Why username and password are not provided for the docker registry?

- Are the private registries not supported?

Related documents:

<https://support.atlassian.com/bitbucket-cloud/docs/use-docker-images-as-build-environments/>

<https://support.atlassian.com/bitbucket-cloud/docs/write-a-pipe-for-bitbucket-pipelines/>


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

I'm afraid that private Docker images are not supported in pipes, the image needs to be public.

This is also mentioned in our doc

* <https://support.atlassian.com/bitbucket-cloud/docs/write-a-pipe-for-bitbucket-pipelines/>

> You don't have to use Dockerhub, if you have another service to host Docker images, but the image does have to be public.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
I can't log in
Asked by Pavel Nedrigailov:

I have an old Bitbucket account which I haven't used for years.

Now I need to access it again, but each time I try to login to Bitbucket, I get infamous "We couldn't log you in" page.

It couldn't be some cache issue. I tried to clear everything, I tried incognito mode, I tried three browsers, nothing works.

So what are my options? Is my old account gone for good?


Answers:
author: Ben
body: G'day Pavel!

Apologies that this is so late, I noticed that this ticket was on our community and hadn't been actioned so I figured that I would jump in.

I have successfully re-activated your workspace and linked it back to its associated Atlassian account, you should be able to log in now.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Change cloning URL for bitbucket cloud account
Asked by Matthew Ferry:

how do i change the cloning URL for my bitbucket cloud account? Its going to be an account for the company but its referencing my user name in the cloning URL.

Or is it just that the URL for me contains my user name, and other users would contain theirs?


Answers:
author: Syahrul
body: Hey [@Matthew Ferry](/t5/user/viewprofilepage/user-id/4973390)

Welcome to the community.

Could you share with me the screenshot of where you see this behavior? I want to verify if it's on your Workspace name or username.

I assume the URL is as follows:

```
git clone https://<username>@bitbucket.org/<workspace_name>/<repo_name>
```

If you are wondering about the \<username\> then it's OK because each user will generate their username when cloning. However, if you are wondering about the username in \<workspace_name\> then this is because it follows your Workspace name. You'll need to rename/change your Workspace name to your Company name under the **Workspace settings.**

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
ECS Deploy Error
Asked by HB:

Hello Atlassian community ,

I'm new with the ECS Deploy pipe and have this error in the pipeline that i can't seem to understand . I'd really appreciate your help and thank you in advance.

So i built an image and pushed it into AWS ECR . I now need to deploy the app with ECS using ECS Deploy pipe .

I have created both a cluster and service in aws as per in the first picture below .However, in the pipeline i keep getting the error that you can find in the second picture even though the cluster is clearly existent in the first picture and all parameters seem correct to me.

Here's how this section of the yml file looks like by the way:  

```
 - step:

  name: 'Deployment of the app with aws ECS'

  deployment: Production

  script:

   - echo "Your deployment of the app with Elastic Container Services script goes here..."

   - pipe: atlassian/aws-ecs-deploy:1.6.2

     variables:

      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID 

      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY 

      AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION 
 
      CLUSTER_NAME: 'weaplan-ecs-cluster'

      SERVICE_NAME: 'DataHandler'

      #TASK_DEFINITION: 'weaplan-ecs-task.json' # Optional

      FORCE_NEW_DEPLOYMENT: 'true'?
```

![Capture.PNG](/t5/image/serverpage/image-id/208214iCF2CC2D9DD039407/image-size/large?v=v2&px=999 "Capture.PNG")![ipe.PNG](/t5/image/serverpage/image-id/208215i0BD54456CEF8B1EC/image-size/large?v=v2&px=999 "ipe.PNG")


Answers:
author: Igor Stoyanov
body: [@EunoiaCode](/t5/user/viewprofilepage/user-id/4968888) hi. Thanks for your question.  

First of all please check if you use the correct aws region.  
Also you can use in config:  
DEBUG: "true"  
to have more information in the logs  

Regards, Igor.

comments: author: HB
body: Hi [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) ,

It was actually a region problem .

Thank you for your response.


Tags: aws

aws-codedeploy

bitbucket-cloud

cloud

error
Someone has already added that key as an access key to a repository
Asked by Doug Pieper:

I get this error when adding an ssh key.![Screenshot_7_27_22__12_39_PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/208235i5151443E400243B4/image-size/large?v=v2&px=999 "Screenshot_7_27_22__12_39_PM.png")

I ran

\`\`\`

$ ssh -T git@bitbucket.org  
authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

\`\`\`

How do identify the key owner so I can fix?


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

You should not be sharing keys between accounts (in general, not just for Bitbucket). You'll either need to find out who you shared the key with so you can remove their access and add their own (or, of course, kill off the other account you were using before), or generate a new access key.


Tags: bitbucket-cloud

cloud
I'm trying everything to be able to clone repositories.
Asked by Ryan Hartley:

I've followed all the steps outlined here... <https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html>

and here

<https://jhooq.com/github-permission-denied-publickey/#3-bitbucket----permission-denied-public-key-cant-cloneclone-to-bitbucket>

and here

<https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/>

yet Im still getting

Warning: Permanently added 'bitbucket.org' (RSA) to the list of known hosts.  
git@bitbucket.org: Permission denied (publickey).  
fatal: Could not read from remote repository.


Answers:
author: Ryan Hartley
body: I was using a tool called puttyGen to format the key properly for bitbucket. If anyone else has this issue. I created a copy of id_rsa.ppk to load into puttyGen, then deleted it and added the regular file to ssh-agent in gitbash.


Tags: bitbucket-cloud

cloud
branch restrictions - branch name - multi name
Asked by Alex Bondarev:

how to specify few names in \`branch restrictions\`

<https://bitbucket.org/>... workspace/ ... repo/admin/branch-restrictions

when you click on \`add branch restrictions\`, you can provide name in "By branch name or pattern" text box.

if i want to apply those same restrictions for dev, qa, prod only and keep unrestricted any other branches, can i put in "dev, qa, prod" or i have to create restriction for name "dev", after that create same restriction for name "qa" etc?


Answers:
author: Syahrul
body: Hey [@Alex Bondarev](/t5/user/viewprofilepage/user-id/3165372)

G'day!

It's currently impossible to add multiple branches in single branch permission. You'll need to create branch permission for each branch you have.

That said, I like the idea of having single branch permission for multiple branches, so I have proceeded to raise a feature request on behalf of you at:

* [Ability to create branch permission for multiple branches](https://jira.atlassian.com/browse/BCLOUD-22059)

Please don't forget to **Vote** and **Watch** so that you'll receive an update whenever we have any.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Bitbucket Pipeline Datadog should also have endpoint variable
Asked by Nataraj:

This integration assumes that the datadog endpoint is <https://app.datadoghq.com/> but the user endpoint is <https://us5.datadoghq.com/> then the integration fails to work .  
DataDog endpoints could be housed in  
US1 : <https://app.datadoghq.com/>  
US3: <https://us3.datadoghq.com/>  
US5: <https://us5.datadoghq.com/>  
etc  
- pipe: atlassian/datadog-send-event:1.1.3  
variables:  
API_KEY: '\<STRING\>'  
TITLE: '\<STRING\> '  
# TEXT: '\<string\>' # Optional.  
# PRIORITY: '\<string\>' # Optional.  
# ALERT_TYPE: '\<string\>' # Optional.  
# TAGS: '\<string\>' # Optional.  
# DEBUG: '\<boolean\>' # Optional.  
# EU_ENDPOINT: '\<boolean\>' # Optional.  
Thanks  
Nataraj


Answers:
author: Nataraj
body: This integration assumes that the datadog endpoint is <https://app.datadoghq.com/> but the user endpoint could be <https://us5.datadoghq.com/> then the integration fails to work .

DataDog endpoints could be housed in any of the regions

<https://docs.datadoghq.com/getting_started/site/>

<br />

<br />

ITE SITE URL SITE PARAMETER LOCATION  
US1 <https://app.datadoghq.com> datadoghq.com US  
US3 <https://us3.datadoghq.com> us3.datadoghq.com US  
US5 <https://us5.datadoghq.com> us5.datadoghq.com US  
EU1 <https://app.datadoghq.eu> datadoghq.eu EU  
US1-FED <https://app.ddog-gov.com> ddog-gov.com US

<br />

The EU_ENDPOINT could be renamed to DATADOG_SITE (i leave this to you) so that the user could point them to a specific endpoint or site

<br />

- pipe: atlassian/datadog-send-event:1.1.3  
variables:  
API_KEY: '\<STRING\>'  
TITLE: '\<STRING\> '  
# TEXT: '\<string\>' # Optional.  
# PRIORITY: '\<string\>' # Optional.  
# ALERT_TYPE: '\<string\>' # Optional.  
# TAGS: '\<string\>' # Optional.  
# DEBUG: '\<boolean\>' # Optional.  
# EU_ENDPOINT: '\<boolean\>' # Optional.  
DATADOG_SITE : <https://app.datadoghq.com> or <https://us5.datadoghq.com>

Thanks  
Nataraj


Tags: bitbucket-cloud

cloud
Bitbucket runner access REST API on host
Asked by Michael Mair:

We have a custom runner configured.

Now we want to access the Kubernetes service on the runner's host machine from within a build step.

Is there any way to achieve that?


Answers:
author: Michael Mair
body: I solved it by using [k0s](https://k0sproject.io/) and reset iptables, which was limiting the access from within the docker container.

My scenario: Test our software with a real running Kubernetes service on CI.

1. Setup custom runner on one of our machines.  
   I used Manjaro linux.
2. Install Kubernetes on that machine (not in a docker container)  
   I used [k0s](https://k0sproject.io/).
3. Clear the iptables config as it restricts access to the host where the actual CI pipeline is executed.
4. Configure the kubectl config to listen on the docker host (most likely something like 172.17.0.1)


author: Igor Stoyanov
body: [@Michael Mair](/t5/user/viewprofilepage/user-id/246004) hi. Thanks for your question.  

Please, check [this guide.](https://support.atlassian.com/bitbucket-cloud/docs/pipelines-runners-frequently-asked-questions/#How-do-I-setup-Pipelines-Runner-with-Kubernetes)  

Regards, Igor.  

comments: author: Michael Mair
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492)Thanks, but that is not what I was looking for. Please see my comment on what I meant and how I solved it.


Tags: bitbucket-cloud

cloud
How to rename a Bitbucket Cloud user group?
Asked by Dirk M?bius:

In the [official documentation](https://support.atlassian.com/bitbucket-cloud/docs/organize-groups-for-your-repositories/) in chapter "Update existing user groups" it says:
> You can *edit the group name*, update the access provided to members of the group, add a new user, or delete users or the entire group.

I cannot find an action to rename a group. How can this be done?

Thanks.


Answers:
author: Syahrul
body: Hey [@Dirk M?bius](/t5/user/viewprofilepage/user-id/4995377)

Welcome to the community!

It can be confusing with the guide but to change/update your Workspace groups is easy. You just need to click the group name and change the name.

I create gifs below on how to do this, please let me know if you have any questions

![ezgif-1-e0763e0991.gif](https://community.atlassian.com/t5/image/serverpage/image-id/208527i51C8111E1B33552F/image-size/large?v=v2&px=999 "ezgif-1-e0763e0991.gif")

I hope this helps.

Cheers,  
Syahrul

comments: author: Dirk M?bius
body: I would never have guessed that the name is clickable! Many thanks!


author: joseph z
body: Really good and helpful. Thanks.


author: Gopal Rathi
body: Thank you ! It was hard to figure out


author: joseph z
body: your answer is very helpful.


Tags: bitbucket-cloud

cloud
The user name and password are displayed in clear text during the login process
Asked by devil:

Please look at my screenshot directly??

The login user name and password are displayed in plain text. If hackers invade or insiders capture packets, you can see everyone's password. Will cause source code disclosure. What is the official solution

BitBucket Build Version5.12.0

![1658922641176.png](https://community.atlassian.com/t5/image/serverpage/image-id/208127i3625E334DEEEC5B0/image-size/large?v=v2&px=999 "1658922641176.png")![1658922673945.png](https://community.atlassian.com/t5/image/serverpage/image-id/208128iE3DBD1D4AA9AF1F0/image-size/large?v=v2&px=999 "1658922673945.png")


Answers:
author: Christian Glockner
body: Hi Devil,

The solution is to use SSL/TLS to encrypt the connection between clients and the server.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

server
Update an existing snippet via API (Python)
Asked by Brendan DeBrincat:

I'm trying to [update the content of an existing snippet via the API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-encoded-id-put) (using Python requests). I've written plenty of other automation, but this endpoint is giving me trouble. Probably because I'm not doing multipart form-data part correctly.

```
import os
import requests
import json

# Authenticate
token_response = requests.post(
url="https://bitbucket.org/site/oauth2/access_token",
auth=(f"{BITBUCKET_KEY}", f"{BITBUCKET_SECRET}"),
data={"grant_type":"client_credentials"}
).json()
access_token = token_response['access_token']

# Update
url = f"https://api.bitbucket.org/2.0/snippets/{workspace}/{encode_id}"
headers = {
"Accept": "application/json",
"Content-Type": "multipart/form-data",
"Authorization": f"Bearer {access_token}"
}
files = {'my-file.md': open('my-file.md','rb')}
response = requests.request(
"PUT",
url,
headers=headers,
files=files
)
if response.status_code != 200:
print(f"Got HTTP {response.status_code} on snippet write: {response.text}")
exit(2)
```

And the API is returning \`Bad Request (400)\` without any further context. Any ideas what I'm doing wrong? :)


Answers:
author: Mark C
body: Hi [@Brendan DeBrincat](/t5/user/viewprofilepage/user-id/1622306),

Thank you for reaching out to the community.

Would it be possible for you to try to use the below content-type instead?

```
application/json; charset='utf-8'
```

Based on our [API 2.0 documentation here](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-encoded-id-put), here's how you can update a snippet's file contents and title using CURL command:

```
curl -X PUT -H "application/json; charset='utf-8'" -H "Authorization: Bearer <access_token>" https://api.bitbucket.org/2.0/snippets/workspace_id/encoded_id -F title="test123" -F file=@TEST.md
```

You can also try the CURL command above to see if the API endpoint works.  
Additionally, you can add "**-vvv**" flag to debug the CURL command.

Hope it helps and let me know if you have further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Schreibfehler auf Ihre Webseite
Asked by ibrahimeray:

![Fehler-1.png](/t5/image/serverpage/image-id/2479iB1323A759B26F7DA/image-size/large?v=v2&px=999 "Fehler-1.png")![Fehler2.png](/t5/image/serverpage/image-id/2480i52D4E096BFAD83E2/image-size/large?v=v2&px=999 "Fehler2.png")


Answers:
author: Thomas Schlegel
body: Hallo Ibrahim,

danke f?r den Hinweis, ich werde es weitergeben.

Viele Gr??e

Thomas


Tags: language-de
Version 2.1.2.5: Crash on Windows 1703 Build 15063.413
Asked by nokinger:

Hi,

i got a Windows 10 Update to 1703 Build 15063.413.

Since that Sourcetree dose not start anymore.

I try to uninstall an reinstall it, but nothing changed. The installer did not show any dialog but it install the application. When i try to start the application i didn't see anything.

In Event Log from Windows i found these two exception messages:

```
Faulting application name: SourceTree.exe, version: 2.1.2.5, time stamp: 0x59354ffaFaulting module name: KERNELBASE.dll, version: 10.0.15063.296, time stamp: 0xa0527b0cException code: 0xe0434352Fault offset: 0x0000000000069e08Faulting process id: 0x3ea0Faulting application start time: 0x01d2ee7f4596bcdcFaulting application path: C:\Users\marti\AppData\Local\SourceTree\app-2.1.2.5\SourceTree.exeFaulting module path: C:\WINDOWS\System32\KERNELBASE.dllReport Id: 93d686e5-ab05-4fdd-908b-ba7b6a0b825aFaulting package full name: Faulting package-relative application ID: 
```

And this, i hope this will help to solve or explain the issue:

```
Application: SourceTree.exeFramework Version: v4.0.30319Description: The process was terminated due to an unhandled exception.Exception Info: System.Management.ManagementException   at System.Management.ManagementException.ThrowWithExtendedInfo(System.Management.ManagementStatus)   at System.Management.ManagementObjectCollection+ManagementObjectEnumerator.MoveNext()   at SourceTree.Utils.WindowsOSHelper.GetWindowsVersion()   at SourceTree.App..ctor()   at SourceTree.App.Main()
```


Answers:
author: nokinger
body: Okay sorry,

my WMI Reposiotry was corrupt. I follow these steps here

<https://community.spiceworks.com/how_to/21413-rebuilding-the-wmi-repository>

now everythink works fine.
Massive slowdowns after running SourceTree for the first time
Asked by kplaneta:

I'm a new user of bitbucket and I have a problem with SourceTree I cannot deal with. Hopefully you can help? Below is a detailed description of the problem I'm dealing with.

After installing Source Tree and opening for the first time I was asked for email and username. Fine. However, after I did that my PC experienced massive slowdown (constant CPU Usage from 25 to 70%, unable to click anything in ST without "App unresonsive" notice in Windows, etc.). Please mind, that at this time I haven't created any project nor repositories yet

This is what I've noticed so far.

1. I have one tab opened in ST main window named with my username.  
2. The "unstaged files" list had a huge number of files (over 30k) that, what I later found were the files in my C://Windows/Users/Username folder. I also noticed there such files as gitconfig or bash_history  
3. In Project's "Settings" \> Advanced \> I ticked off both options, e.g. "automatically refresh..." and "refresh remote...". And the CPU usage went back to normal.  
Since I need to use BB and ST I would like someone to tell me:

1. Why a default project popped out in my ST after I turned it on for the first time?  
2. Why did it point at my Windows/User/Username folder?  
3. Why are there these extra files?  
4. How to delete this project - it always pops up when I open ST  
5. What does the "Project Folder" link option in Tools \> Options \> General do? I changed it a few times and it doesn't seem to do anything. Is it only for this single project or for all project in ST? I'm confused since I'm guessing there can be many projects but this option is in general configuration options of ST and not in "Settings" marked with a cogwheel on the right hand side of the ST window).

Any hep would be greatly appreciated.


Answers:
author: Ana Retamal
body: Hi Krzysztof! From your description it looks like you might have a git folder inside your username folder. This will make SourceTree believe that this directory is a repository and will attempt to open it, unsuccessfully.

Can you check your username folder and make sure there's no git folder in it? If you find the git folder, you can simply delete it.

Let us know how it goes!

Best regards,

Ana


Tags: performance

windows
Can I change the Sourcetree 2 installation folder on Windows?
Asked by Ted Corcovilos:

I'd like to install Sourcetree in a different location than the default. How can I do this?


Answers:
author: Ana Retamal
body: Hi Ted! Changing the location of the SourceTree installation is not currently possible. We have a feature request to allow users to change the location of the installer, you can find it at [SRCTREEWIN-7168](https://jira.atlassian.com/browse/SRCTREEWIN-7168). You can write a comment, watch the ticket for updates or vote for it if you're interested.

Best regards,

Ana


Tags: windows