youngmon/atlassian-qna huggingface dataset:
Bamboo onDemand Stash integration
Asked by IgorYastrebov:

Stash commit should show build information like here: <https://confluence.atlassian.com/display/BAMBOO/Integrating+Bamboo+with+Stash>

I read a bunch of articles around this issue. Nothing help.

Bamboo Stash plugin is enabled, I can configure bamboo notification to Stash but a warning says about some app link issue; like this: <https://jira.atlassian.com/browse/BAM-13876>

Application links are established between Bamboo/Stash though.

Can anybody help?


Answers:
author: IgorYastrebov
body: bamboo 5.6 is released on demand 2 weeks ago. No progress with the original issue ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad") still do not see a Basic auth from bamboo app link.


author: IgorYastrebov
body: so, waiting for Bamboo 5.6 on Demand


author: cbenard1
body: Hi Igor,

The workaround for this issue as mentioned here:  
[](https://confluence.atlassian.com/display/BAMKB/Bamboo+build+results+not+published+to+stash+and+an+NPE+is+thrown "here")<https://confluence.atlassian.com/display/BAMKB/Bamboo+build+results+not+published+to+stash+and+an+NPE+is+thrown>

unfortunately does not apply to the OnDemand platform as there is no ability to change the authentication type for Application Links. The only option is to wait for the bug to be resolved in Bamboo 5.6, so you should see it in one of the next releases.

My apologies that we do not have a better solution than this at the time, but please add your comments to [](https://jira.atlassian.com/browse/BAM-13876%20)<https://jira.atlassian.com/browse/BAM-13876>and become a watcher in order to receive immediate updates.

Thanks

Turner


author: Mikhail Turalenko
body: according to <https://confluence.atlassian.com/display/BAMBOO/Integrating+Bamboo+with+Stash>

"Note that the legacy Stash notification type is deprecated -- it is still available in Bamboo 5.6 but will be removed in Bamboo 5.7."

so everything should work without it i assume. but still not. i have created related question with a few suggestions <https://answers.atlassian.com/questions/12161578>


Tags: bitbucket-administration

bitbucket-server
Differentiating between triggers
Asked by George V_ Reilly:

For our daily scheduled build, I'd like to run additional tests and metrics (such as code coverage). For our repository triggered builds, I'd prefer the build to be as fast as possible. How can I tell what triggered the build, so that I can handle appropriately?


Answers:
author: Timothy
body: If you seperate them into different plans, then you should be able to do this. Then you have a 3rd plan that collects all the artifacts.
bamboo: how to delete old artifacts ?
Asked by Hussain Misbah:

is there a way to delete old artifacts from bamboo server ?


Answers:
author: Spot Support
body: The **Build Expiry** feature has options to auto delete artifacts.

comments: author: Hussain Misbah
body: Thanks for pointing me to this feature.


author: Richard Cross
body: This won't delete old artifacts created before you implemented the build expiry though. How do I go through and delete all artifacts older than a certain age?


author: Edward_Burns
body: Dream it up


Tags: bamboo-administration
bamboo fails to push build status to stash
Asked by Fabian Hollunder:

The build-result push from bamboo to stash is failing. The error message is following:

*"401 Unauthorized" received while attempting to store build status against Stash instance \`Stash', check your application link configuration.*

I followed the instructions from this page ([](https://confluence.atlassian.com/display/BAMKB/Unable+to+see+Bamboo+build+results+in+Stash)<https://confluence.atlassian.com/display/BAMKB/Unable+to+see+Bamboo+build+results+in+Stash>), but could not resolve the problem.

For us it is necessary to see the build results in stash, otherwise the auto merging functionality is not working.

We are running bamboo 5.5.0 and stash 2.12.2 on linux.

If necessary I can provide the logfiles.


Answers:
author: cofarrell
body: Hi Fabian,

I might suggest you also raise a support ticket and attach your logs - that's generally easier for us to resolve these kinds of problems.

[](https://support.atlassian.com)<https://support.atlassian.com>

Cheers,

Charles


Tags: bitbucket-server

build

notification
Where does Bamboo saves the builds configuration?
Asked by Sergio Fern?ndez:

I have a project which changed of git repository, and I'd like to manualkly change it in a concrete file, but I cannot find it :-/


Answers:
author: gasiino
body: Hi,   
I know it would be a bad idea to start messing with configuration by changing it on the raw side (i.e. directly on the db).   
However I have years of experience with TeamCity where I was sharing in read-only the configuration folders (the parts of the projects and builds, not the files with the passwords) and the file comparison was easying the process because even when you clone a setup and change only something, it is always useful to perform a check on differences: it makes your life easier.  
Is there anything similar in Bamboo?  
Any way to export the whole configuration for a build (or deployment setup, or repository) so I can compare it with another (working) setup and spot the differences (or the errors)?  
After this check it becomes easier to just apply the changes from the UI.  
How can I get the config from Bamboo?   
Regards,  
Gabriele


author: Sergio Fern?ndez
body: The problem is that I forgot to do it before performing an maintenance, and now it does not start (or it is taking too long) because the error:

```
2014-05-22 16:12:03,196 INFO [4-BAM::PlanExec:pool-8-thread-2] [DefaultErrorHandler] Recording an error: Unable to detect changes : FOO-BAR1 : java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote https://old.host/project.git failed with code 128. Working directory was [.]., stderr:[fatal: https://old.host/project.git/info/refs not found: did you run git update-server-info on the server?]
```

Any idea?

comments: author: Peter Van de Voorde
body: You could put back a copy of the repo on the old host.

Startup Bamboo, change the repo and remove the copy on the old host.

Just an idea.

Best regards,

Peter


author: Marcin Gardias
body: The log message clearly indicates that Bamboo started... It comes from Plan triggering thread. Fix your build configuration and you should be fine. Unless there's something else that's stopping you from doing so, in which case you should contact Atlassian Support.


author: Peter Van de Voorde
body: Hi Sergio,

This is all saved in the database and it's a really bad idea to start playing around there.

the easiest way is to simply use the UI to change the repository.

You can also take a look at the Bamboo CLI : [](https://bobswift.atlassian.net/wiki/display/BCLI/Examples)<https://bobswift.atlassian.net/wiki/display/BCLI/Examples>

It does have an updateRepository action.

Best regards,

Peter


Tags: bamboo-administration
Bamboo SSH Task - Run sudo commands
Asked by Edwin Perez:

I set up a bamboo box and am working on a deployment task. If I try to run any sudo command from the SSH task, I get the following error: "sudo: no tty present and no askpass program specified Sorry, try again."

I have read through some fixes:

* Remove the following line in sudoers file: Defaults requiretty
  * sudoers file on server does not have this.
* Run ssh with -t command
  * Do not know how to achieve this in bamboo.
* Use RSA tokens to connect bamboo server with remote server.
  * Got the token (user ssh-keygen -t rsa), however, I get the following error:
    * There is something wrong with your private key: java.io.IOException: Could not read key pair from: \[PrivateKeyStringResource\]

Anybody know how I can acomplish any of those tasks. I need to be able to run some sudo commands on remote server.

Thanks.


Answers:
author: jan roman
body: If you using putty gen to create your private key. You need to save it in open ssh format. Conversions -\> Export OpenSSH Key


author: Kanstantsin Kniaziuk
body: IMHO you should tune your remote server.

You can try this approach:

<http://askubuntu.com/questions/159007/how-do-i-run-specific-sudo-commands-without-a-password>


author: demelvin
body: Also experiencing this issue.

* There is something wrong with your private key: [java.io](http://java.io).IOException: Could not read key pair from: \[PrivateKeyStringResource\]

Any luck on solving this?


author: Ryo Chiba
body: I too am having this issue and have read through these fixes with the same results.
Is it possible to associate a script task to the category of test?
Asked by john livingston:

Our post-build tests are executed through a script task. When the tests are executed, status is displayed as "Building for 8 mins". It seems Bamboo categorically associates a script task to build. Is there a way to configure a script task as a test script task instead of build script task?


Answers:
author: john livingston
body: the following post describes a solution

["No tests found": how do I make bamboo aware of my custom tests?](https://answers.atlassian.com/questions/8620918)

our test application now produces a JUnit xml file which is consumed by a JUnit Parser 'final' task


author: john livingston
body: No, I did not find a way. Our tests are still executing via script tasks. They are not recognized by Bamboo as tests.


author: Jan Proke?
body: Hi John,did you find the way how to force bamboo to understand script task as test? We are facing the same problem, we have about 15 tests in script, but the results of each script task (test) is not shown in test results.Thank you.
Does BitBucket Server version 5.16 support Pages?
Asked by ondaly:

Thanks


Answers:
author: Kurt Klinner
body: [@ondaly](/t5/user/viewprofilepage/user-id/4810395)

Hi Ondaly

by pages, do you mean something similar to Github pages?

Bitbucket version 5.16 is already end of life, you should check for potential upgrade options to the newer versions

Cheers

Kurt


Tags: bitbucket-server

server
Image name format error while using custom docker image from Jfrog docker registry
Asked by a2l:

I'm using docker images hosted on Jfrog registry.

Bitbucket pipeline is using these custom images from Jfrog registry for building the code.

The pipeline image section looks as below

\`\`\`  
image:  
name: $DOCKER_BUILD_IMAGE  
username: $JFROG_ARTIFACTORY_USERNAME  
password: $JFROG_ARTIFACTORY_PASSWORD  
email: $DOCKER_IMAGE_REGISTRY_EMAIL  
\`\`\`  
The value of the DOCKER_BUILD_IMAGE is set in repository variables as below: \`\<mycompany\>.jfrog.io/artifactory-docker-dev-local/\<product\>/\<image-name\>:latest\`  
When pipeline is run, I'm getting following error  
![pipeline_error.PNG](/t5/image/serverpage/image-id/187890i8FA219164493FE4B/image-size/large?v=v2&px=999 "pipeline_error.PNG")

If I use same image and pull it and run using docker, I can run it with no issues.

e.g.

\`docker run --rm -it \<mycompany\>.jfrog.io/artifactory-docker-dev-local/\<product\>/\<image-name\>:latest\`

works fine.

Angle brackets surrounding \`mycompany\` and \`product\` in the image name are not present in actual name used. They are mentioned here only to indicate that the actual values in the image name are different than shown here.

Can someone help me understand how the bitbucket pipeline is expecting the image name here?


Answers:
author: a2l
body: I have observed that if I specify the image name directly in the bitbucket-pipelines.yml file instead of repository variable, bitbucket is able to recognize and use the docker image correctly.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

docker

jfrog

windows
How to upload a folder/file to an existing repository with files already in it
Asked by Kristoffe Angelo Ambe:

hi, im quite new to bitbucket and initially uploaded some files for our first activity and had no problems. but now, im having problems uploading the second time.


Answers:
author: Kurt Klinner
body: [@Kristoffe Angelo Ambe](/t5/user/viewprofilepage/user-id/4809621)

Hi Kristoffe

welcome to the Atlassian community.

Do you have a local copy of our repository?

If yes then you should add the files there, commit the changes and push them to Bitbucket.

<https://support.atlassian.com/bitbucket-cloud/docs/copy-your-git-repository-and-add-files/> could be helpful

All the best

Kurt


Tags: bitbucket-cloud

cloud
Using Workspace variables in deployment variables
Asked by Alan Wolman:

We have a number of keys that are used by all of our builds (but are different for each of our environments) and we would like to store these as workspace variables - but expose these in each of our deployments by referencing the workspace variables.  

<br />

e.g.  

Workspace Variables  
PROD_KEY  
STAGING_KEY  
DEV_KEY  

Deployments  
Dev:  
KEY=$DEV_KEY  
Staging:  
KEY=$STAGING_KEY  
Production:  
KEY=$PROD_KEY   

script:  
- echo $KEY  

<br />

Is there any way of having a deployment variable reference a workspace variable?


Answers:
author: Ben
body: Hey Alan!

I have just tested on my end and can confirm the exact configuration you have defined will work to reference workspace-level variables IF those workspace-level variables are unsecured, as you are able to reference both deployment/workspace variables when running a pipelines build.

For more information please refer to the following link:  
<https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/>

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Ben Orgil
body: The variables the user asked about were "KEYS" so they probably need to be secured.

Your saying this won't work for secured workspace variables?

Is there just a way to define environments at the workspace level?


author: Ben
body: Hey Ben,

Yes, the idea behind "secured" variables is that they are secure and therefore echoing them will not reveal the values inside these.

There is some text when configuring workspace variables from within **Workspace Settings \> Pipelines \> Workspace Variables** that defines the above:
> Environment variables added at the workspace level can be accessed from all repositories that are within that workspace. To access a variable, put the $ symbol in front of its name. For example, access AWS_SECRET by using $AWS_SECRET.   
> Workspace variables can be overridden by variables added on the repository level.
>
> **If you want the variable to be stored unencrypted and shown in plain text in the logs, unsecure it by unchecking the checkbox.**

Environments can only be defined at the repository level from within **Repository Settings \> Pipelines \> Deployments.**

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
How do I create a workspace
Asked by Michael Hasse:

The [documentation](https://support.atlassian.com/bitbucket-cloud/docs/create-your-workspace/) says: "Click **+** in the leftmost, global sidebar and select **Workspace** under **Create**."

Nowhere in Bitbucket do I see either a "leftmost, global sidebar" or a + sign.

Can anyone post a screenshot or provide more detailed directions.


Answers:
author: Vishwas
body: Hey [@Michael Hasse](/t5/user/viewprofilepage/user-id/3934335)

Please navigate to this URL <https://bitbucket.org/account/workspaces/>

There you will see "Create Workspace" option.

Regards,

Vishwas


author: Michael Hasse
body: Deleted


author: Michael Hasse
body: Hi Vishwas,

Thanks, that's perfect!

Am I correct that there is no link to this anywhere in on the site? I would expect this to be in the navigation bar, next to Projects, or under More.

comments: author: Vishwas
body: I think it should be available in the options when we click personal profile button


Tags: bitbucket-cloud

cloud

workspace
Unable to login Bitbucket
Asked by HaiXin.Sun:

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


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

I'm afraid posting an error message with no context and no explanation of whether you have done what it suggests you do next is not going to get you any help.

Please tell us what the problem is, and what you have tried to do to get past it (like fixing your browser extensions or using a clean installation of a different browser)


author: Caroline R
body: Hi, [@HaiXin.Sun](/t5/user/viewprofilepage/user-id/4809244), welcome to the community!

Checking the Bitbucket account linked to the email you used to create this question, I was able to confirm that it was inactive, so I reactivated it. Could you please try to access it now and let me know how it goes?

Looking forward to hearing from you.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
bitbucket - cannot post comment to issue
Asked by LeTrThang:

In bitbucket - now cannot post any comment to issue


Answers:
author: RMS2
body: Duplicate of <https://community.atlassian.com/t5/Bitbucket-questions/Unable-to-add-a-comment-to-an-issue/qaq-p/1970333>


Tags: bitbucket-cloud

cloud
How to use app password with Git Gui under windows?
Asked by jim-frenzel:

I am using Git Gui (or git-gui) from git-scm.org under Windows and I can't figure out where to update the authentication credentials to use the Bitbucket app password that I created. If I use the command line interface I get this:

$ git fetch  
fatal: Invalid credentials  
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.  
remote: See our community post for more details: <https://atlassian.community/t5/x/x/ba-p/1948231>  
remote: App passwords are recommended for most use cases and can be created in your Personal settings:  
remote: <https://bitbucket.org/account/settings/app-passwords/>  
fatal: Authentication failed for '<https://bitbucket.org/> \[...\]


Answers:
author: Caroline R
body: Hi, [@jim-frenzel](/t5/user/viewprofilepage/user-id/4088207), thank you for reaching out to Atlassian Community.

Checking the output you have shared with us, it looks like git didn't ask you to inform a password, is that correct? If that's the case, git is probably using some password stored in your Windows credentials.

Could you please make sure you have deleted all the credentials related to Bitbucket under Windows Credential manager? You can follow the next steps to delete those cached credentials:

* On the start menu, search for **Credential Manager**

* In the window that will be open, select the **Windows Credentials** option

* Delete all the entries related to Bitbucket (this will clear all the cached credentials)

Please let me know how it goes and feel free to share any additional questions or concerns regarding this case.

Kind regards,   
Caroline


Tags: cloud
Self Hosted Pipeline Runners with self signed certificate firewall inspection
Asked by Bobin Joseph:

Hello,

I am running a self hosted runner as mentioned here in K8s. <https://support.atlassian.com/bitbucket-cloud/docs/pipelines-runners-frequently-asked-questions/>

I am running into an issue with our CORP firewall performing inspection on outbound traffic. The runner fails as it cannot talk to Bitbucket to register itself as a runner in my repo.

I would like to know how I can install or add the self-signed cert to the bitbucket pod so that it accepts the certificate as valid.

Thanks,


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

What you can do is build a new Docker image that is based on the image runners are using and modify the certificate store.

An example Docker file would be the following:

```
FROM docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1
COPY ldap.cer $JAVA_HOME/lib/security
RUN \
    cd $JAVA_HOME/lib/security \
    && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ldapcert -file ldap.cer
```

where **ldap.cer** replace with your certificate. Place the certificate file in the same directory as the Dockerfile, and then you can build the image with the following command

```
docker image build -t example/runner:cert .
```

and push it to Dockerhub or another registry.

When you create a runner from the Bitbucket website, you are given a *docker container run* command to start the runner.  
In that command, replace **docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1** with the name of the image you pushed earlier and then use it to start the runner.

Please feel free to let me know how it goes and if you need anything further.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

bitbucket-runners

cloud
Can pull from repo, but cannot push. "fatal: protocol error: bad line length character: auth"
Asked by Justin Alcorn:

Hello.

I created a repository in bitbucket cloud and added my ssh key to my user profile.

I am able to successfully clone the repository and pull down new changes. But whenever I push, I am met with the following error:  
"fatal: protocol error: bad line length character: auth"

I am using Git Bash for Windows. git --version returns "git version 2.35.1.windows.2"

So far I have tried removing and recreating ssh keys, testing my connection to bitbucket cloud, restarting my PC, deleting the whole repository in bitbucket and recreating it, and forcing ssh to use the identity file. Nothing seems to work.

I was able to pull AND push from an ec2 instance with no issues. I suspect it might be a bug with git for windows.

I'm at my wits end and can't find any solutions from google that actually work on my machine. Anyone have any ideas to solve this?


Answers:
author: Ben
body: Hey Justin!

* Is the issue happening only with this repository?
* Are you authenticating through SSH or HTTPS?
* Does the push work using other authentication methods? (i.e.: SSH if you are using HTTPS, HTTPS if you are using SSH)
* Please send us the output of the verbose push command as given below:  
  **If you are using Linux**

  ```
  GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push
  ```

  <br />

  **If you are using Windows**

  ```
  set GIT_TRACE_PACKET=1

  set GIT_TRACE=1

  set GIT_CURL_VERBOSE=1

  git push
  ```

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Greg Matthew Crossley
body: [@Justin Alcorn](/t5/user/viewprofilepage/user-id/4807708), did you ever get this resolved? I'm having the exact same issue.


author: wilddata
body: I'm having the exact same issue.  
Anything I can try?


Tags: bitbucket-cloud

cloud
VS2019: failed to fetch from the remote repository.
Asked by Yurii Petrenko:

![Screenshot_1.png](https://community.atlassian.com/t5/image/serverpage/image-id/187737i6E1EE92ADDB288D4/image-size/large?v=v2&px=999 "Screenshot_1.png")![Screenshot_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/187739i7E52724DE2B33D8D/image-size/large?v=v2&px=999 "Screenshot_2.png")

How to fix?


Answers:
author: Yurii Petrenko
body: Solved.

1) Clear credentials in Visual studio

2) Create an App password: <https://bitbucket.org/account/settings/app-passwords/>

3) Clone repository with your BitBucket login and App Password


author: Yurii Petrenko
body: ![Screenshot_3.png](https://community.atlassian.com/t5/image/serverpage/image-id/187751i448C96AEDE168CE2/image-size/large?v=v2&px=999 "Screenshot_3.png")

when i try to clone repository


Tags: bitbucket-cloud

cloud