youngmon/atlassian-qna huggingface dataset:
Bambo OnDemand SSH Task permission problem ?
Asked by Jean-Sebastien (GA):

Hello,

Here is my situation :

In Bamboo OnDemand, I am setting up a simple deployment project with a SSH task.

The task is responsible for pulling the source code from a Bitbucket Account to the target server (linux) in the web root drectory, and then for triggering PHPUnit tests on this new code.

To accomplish this, the SSH Task basically runs the following commands, and is set up with connexion using a user (*john*) and his password :

```
cd /path-to-web-root/git pull origin masterphpunit --configuration tests/phpunit_conf.xml --log-junit tests/phpunit_report.xml
```

Results :

the pulling is ok.

the phpunit commands leads to the following error :

"/usr/bin/env: php: No such file or directory"

Please notice that :

(1) If I replay the same scenario but with *root* user, phpunit is properly executed.

(2) If I run the same phpunit command as in the SSH Task, directly from the server command line, logged in as user *john*, phpunit also works.

(3) phpunit is installed on the target server via the "phar" file, and is version 3.7.37

(4) on the target server, php is here : /usr/local/php5.5.6/bin/php5php

I really don't get why it works in one case and not the other.

Any help possible on this one ?

It looks like a permission problem, or a path problem... I don't know I am really not a server expert

:)

Jess


Answers:
author: Jean-Sebastien (GA)
body: So, I reply to myself :

The problem was simply that the PATH variable was different from user *root* and user *john*, so it couldn't find phpunit...

hope it will help someone :)
Concurrent bamboo builds on different remote agents
Asked by Paritosh Ahuja:

I have 2 remote agents for the build, what is the entire process to fire a same build using bamboo,concurrently on those two different agents.

Whatever i have gethered till now is (Please correct me if i am wrong) :-

- We can add a requirement in bamboo (i can add one more agent), i already have one agent configured for the current job. Once i configure the new one there will be 2 agents for the same job.

My Questions is:-

1. If i have two remote agents and only one job is there for that remote agent will it run on both those agents? if no, how will it decide that which agent to pick at this point of time.

<br />


Answers:
author: rsperafico
body: Hi Paritosh,

Thank you for your question.

If you have two agents (i.e.: Bamboo local agent, Bamboo remote agent) and the task you have set up is suitable to be run on both agents, then they will run this build/deploy.

You can verify how many agents can run your:

* Build by going to (Plan Configuration) under (Tasks) tab.  
  You will find the following message on the top-right hand side "*2 agents have the capabilities to run this job*"
* Deploy by going to (Deploy Configuration \> Edit Tasks)  
  You will find the following message on the top-right hand side "*2 agents have the capabilities to run this job*"

Kind regards,  
Rafael

comments: author: Paritosh Ahuja
body: Hi, thank you for replying, i understood whatever you said, right now i am having only one agent installed to build JOB-A, now in requirements tab i will add one more agent, so that change will essentially set 2 agents for JOB-A. After this i will copy the directory structure of the JOB-A on new build box and lastly i need to make one change in a property called concurrent job runs, i think by default this is set to 1 i will set it to 2. Is this all i need to do for making JOB-A run parallelly on these both agents?

If above process is incorrect please let me know in case of any changes and if it is correct can you please let me know if i have both agents free right now and i run a plan to build JOB-A how it will pick an agent from the two installed agents to build this job?


author: Paritosh Ahuja
body: Hi Rafael,

Can you please tell me how to achieve this.
Bamboo EC2 Private Key does not work
Asked by Justin Burger:

Hi,

I'm trying to setup Bamboo with EC2. I've got some jobs that are failing, so I'd like to login to the instance to view where it got caught up and troubleshoot the issue.

The issue is, the .pk key provided on bamboo for the instance has never worked. I've looked thru other questions and see responses like "someone else in your orginization changed it" but it's just me... I'm using the stock AMI, I have not changed a thing.

I've tried terminating the instance and re-loading it many times, no matter what I try, I can't get access.

If I spin up my own copy of the same AMI from the AWS management console and assign a differnt key to it, it works, but I can't get into the instances Bamboo spins up.

$ ssh -i elasticbamboo.pk [ec2-user@ec2-54-86-127-114.compute-1.amazonaws.com](mailto:ec2-user@ec2-54-86-127-114.compute-1.amazonaws.com)

Permission denied (publickey).


Answers:
author: Justin Burger
body: Solved via support request, which pointed me to this:

<https://confluence.atlassian.com/display/ONDEMANDKB/Obtaining+AWS+Key+Pair+to+access+Amazon+Elastic+Instances>
Trying to migrate to new machine: Import failed. Error while updating baseUrl: Premature end of file
Asked by Doug McCluer:

I'm trying to migrate a bamboo instance to a new machine.

I exported the old instance to a zip file, and then set up bamboo on the new machine, choosing to import existing data, and pointed it to the zip file I exported from the other machine.  

I then found myself at a screen with the following message:  

```
You cannot access Bamboo at present. Look at the table below to identify the reasons:Time    Level    Type    Description    Exception2014-06-03 13:57:10    fatal    import     Import failed. Please contact Atlassian at https://support.atlassian.com/ and attach your export file. &lt;br /&gt; java.lang.Exception: Error while updating baseUrl: Premature end of file.        at com.atlassian.bamboo.migration.XmlMigrator.setBaseUrl(XmlMigrator.java:255)        at com.atlassian.bamboo.migration.XmlMigrator.importXml(XmlMigrator.java:185)        at ...
```

I've tried both the export and the import steps multiple times. How can I move my bamboo instance onto a new machine?


Answers:
author: Nic Brough -Adaptavist-
body: What does the log say when you export?

comments: author: Doug McCluer
body: nothing.   
The onscreen message says, "Bamboo has successfully exported to D:\\bamboo\\exports\\export_dedobuildserver_3103_20140603_2.zip. Time taken: 21 seconds"  
The log file is empty though.


author: Nic Brough -Adaptavist-
body: I'm assuming you are transferring the export from the source machine to the target. Are you sure the files are identical on both machines? Could you try not using zip as well (some windows compression programs have "issues", shall we say)


author: Doug McCluer
body: Yes, I am transferring the export on to the new machine.   
The zip is generated by bamboo, so I'm assuming compression is not the issue.   
I just ran an MD5 hash on both machines and verified the file was not altered in transit.


author: Nic Brough -Adaptavist-
body: Right, I think you've hit a bug there. I think it might be best to go to Atlassian with this one


Tags: bamboo-administration
Logfile not found
Asked by Pascal Eberhard:

Hello, we use Bamboo and it works fine, except one thing.  

Sometimes we get the error message "Could not find test result reports in the /\[..\]/build-dir/SHTS-RLS-SYN2 directory.".  

The only article to that I found was ..

[](../../12275/bamboo-does-not-finde-the-reports?utm_source=SAC&utm_medium=dashboard "Link")[https://answers.atlassian.com/questions/12275/bamboo-does-not-finde-the-reports?utm_source=SAC\&utm_medium=dashboard](https://answers.atlassian.com/questions/12275/bamboo-does-not-finde-the-reports?utm_source=SAC&utm_medium=dashboard)

.. but that is not the solution.  

I use already relative pathes for the log.  

I use the same logfile per Job, could that be the problem?  

Many Thanks


Answers:
author: Felipe Kraemer
body: Hi Pascal,

I am wondering if [this KB article](https://confluence.atlassian.com/display/BAMKB/JUnit+Parser%3A+Test+results+are+not+found) can help you?

Kind regards,  
Felipe Kraemer  
Atlassian Support

comments: author: Pascal Eberhard
body: Thanks.

At the previous days I tried the sleep-touch workaround in many combinations, but the error still occured.

My workaround now, is to use PHPUnit Testsuites and pack it into as less Bamboo Jobs as possible.
Bamboo via proxy
Asked by lior hasson:

What is the configuration that the user need to perform in order to make the Bamboo communicating through (via) proxy?

<br />

The only thing I found was to set JVM properties. (-Dhttp.proxySet=true, ...)

Thanks

Lior


Answers:
author: Przemek Bruski
body: Yes, it should be enough. Not all components in Bamboo work through proxy though.

comments: author: lior hasson
body: Thanks for the answer,

Another thing I wanted to ask:

If I config the Bamboo server with the proxy JVM properties, the server will pass the environments to his agents, or I need to config the proxy to the agents separately?

Lior


Tags: proxy
Bamboo license
Asked by Daniel Lazdin:

I have expired license of Bamboo. Then we bought 10 jobs license. When I try to save new license I get "You currently have 15 jobs configured and the new license only allows 10 jobs. To continue updating your license you will need to remove 5 jobs or reduce the number of branches you are using.." message.

How can I remove 5 jobs if I cannot access Bamboo?


Answers:
author: Bruna Griebeler
body: Hi Daniel

Try generating an evaluation license for your bamboo on [my.atlassian.com](http://my.atlassian.com).   
By chnaging the license on Bamboo Application, you'll be able to login. After removing the jobs, you may set you old license again.
Can I link existing EC2 instance to Bamboo OnDemand?
Asked by Jorge Jauregui:

Given I have an existing EC2 instance running on AWS, is it possible to hook that up to Bamboo OnDemand? Basically I'd like to know if I can install an elastic agent on it and have it run builds triggered by Bamboo OnDemand?

Or must Bamboo OnDemand be the one that always creates Elastic Instances?


Answers:
author: Przemek Bruski
body: Not possible, Bamboo OnDemand server has to be the one that creates the instance.


Tags: cloud
Bamboo-New to Continuous Integration
Asked by Swaminathan Balaubramanian:

Can you please tell me why we need a database (Postgres/ MySQL/ Oracle) with Bamboo? I do not understand what purpose the DB here serves? Is it just to have a database regarding all the builds that have happened? Is it from this DB that we get the build trends/ details about test runs/ code coverage etc? SORRY IF MY QUESTION IS TOO DUMB...BUT THIS IS MY FIRST JOB AND I'M TRYING TO UNDERSTAND.


Answers:
author: Daniel Wester
body: Its where the results are stored, various configs etc.

comments: author: Swaminathan Balaubramanian
body: Thanks Daniel


Tags: atlassian-support
I am Facing the issue while push the code to bitbucket
Asked by sgirish11:

![Capture.PNG](/t5/image/serverpage/image-id/188186i4946F5E6B922104B/image-size/large?v=v2&px=999 "Capture.PNG")


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

Have a read of the documentation that the error points you to.
Remove the display of the build status of the declined PR
Asked by ikorotkov:

Necessary remove the display of the build status of the declined PR from the JIRA task.

At the moment visible, all build statuses.

There was an assembly with an error, after which the PR was declined.

It is necessary to display only the build status of not declined PR from the JIRA task.

Please tell me how to do it?

![Screenshot_9.png](https://community.atlassian.com/t5/image/serverpage/image-id/188175iC6CFB57ACFB35FA3/image-size/large?v=v2&px=999 "Screenshot_9.png")![Screenshot_8.png](https://community.atlassian.com/t5/image/serverpage/image-id/188174iB2F0E6170C37790C/image-size/large?v=v2&px=999 "Screenshot_8.png")![Screenshot_10.png](https://community.atlassian.com/t5/image/serverpage/image-id/188176i4670EB0A9B8D31BB/image-size/large?v=v2&px=999 "Screenshot_10.png")


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

The **Builds** tab of the **Development** panel will show the *latest* Pipelines build that ran for a branch that includes the Jira issue key in its name.

I'm afraid that it is not possible to filter which builds will be displayed in that tab.

I was wondering if you could share some more details on your use case, so I can see if and what kind of a feature request would make sense here:

* Are these Pipelines builds defined to run on branches? Or are they builds running on pull requests (pull-requests definition of the yml file)?  

* Assuming the scenario that you have a branch named e.g. JSW-12-branch: create a PR with that branch as a source, a build runs and fails, then you decline the PR.  

  Do you then update the existing branch, e.g. JSW-12-branch, and create a new PR out of the same branch?  

  Or do you work out of a new branch instead?  

* Is your requirement to hide all Pipelines builds for a certain branch, if that is a source branch of a PR that was declined?

Kind regards,  
Theodora


Tags: build

jira

jira-cloud
Hi I am facing issues while committing the code to Bitbucket repository
Asked by bobindra kumar:

I am facing issues while committing the code to Bitbucket repository using Visual studio 2019.

I have setup all setting Global settings and Repository settings in visual studio and I also created App password on bitbucket and try to commit my code after enter bit bucket credentials but still I am facing same issue Git failed with a fatal error.  
Invalid credentials. I also update visual studio 2019 and also update Git for window and GitHub extension for visual studio but still I am facing same issues below some of the screen shots for your reference

![MicrosoftTeams-image (3).png](https://community.atlassian.com/t5/image/serverpage/image-id/188139i73B26D5768D7E204/image-size/large?v=v2&px=999 "MicrosoftTeams-image (3).png")![MicrosoftTeams-image (4).png](https://community.atlassian.com/t5/image/serverpage/image-id/188140i5D2D1BBA071A9E4B/image-size/large?v=v2&px=999 "MicrosoftTeams-image (4).png")![MicrosoftTeams-image (5).png](https://community.atlassian.com/t5/image/serverpage/image-id/188142i841BCE8A43CB737D/image-size/large?v=v2&px=999 "MicrosoftTeams-image (5).png")![MicrosoftTeams-image (6).png](https://community.atlassian.com/t5/image/serverpage/image-id/188141iCBD046B12324E1F0/image-size/large?v=v2&px=999 "MicrosoftTeams-image (6).png")

Please give me any solution as soon as possible.

Thanks in Advanced.


Answers:
author: Steckelfisch
body: login with your username, not your email


Tags: bitbucket-server

server
Problem: "Someone has already added that key as an access key to a repository."
Asked by patelpreksha:

I cannot add my SSH key to my account or at project level because of this: "Someone has already added that key as an access key to a repository." Note that I am able to add SSH key into specific repository.

I have checked all the places (company user, all the repositories I see etc.) but this key is not associated to none of the repositories nor users I know of.

I have tried to SSH bitbucket.org, but is does not say any details:

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

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

Could anybody please suggest/help where the SSH key is being used?

No, using multiple SSH keys is not an option.


Answers:
author: Caroline R
body: Hi, [@patelpreksha](/t5/user/viewprofilepage/user-id/4814453), welcome to the community!

As we'll need to know the public SSH key to further investigate this case, I have created an internal ticket for you using the email of your community account, so you don't have to share this information here.

You should have received an email with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.

Please feel free to let me know if you have any questions.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Authentication fails when pushing docker image to private repository
Asked by Jan-Erik Stensli:

We have a pipeline setup in Bitbucket that builds multiple docker images and pushes them to a private repository. Suddenly we are getting a "error parsing HTTP 403 response body" error when the "docker push" command is being run.

We are calling "docker login \<url to private repository\> --username \<username\> --password \<password\>" before doing the push, and that call returns "Login Succeeded".

While checking on the receving end, the Authorization-header doesn't seem to be valid, it's far too short.

The last time the pipeline worked as it should was in February, the 18th. We haven't done any changes to the pipeline after that date.


Answers:
author: Patrik S
body: Hey [@Jan-Erik Stensli](/t5/user/viewprofilepage/user-id/4712589) ,

Welcome to Atlassian Community!

I understand you are currently facing issues to push docker images to your private registry using Bitbucket Pipelines. As per the details you have provided, you mentioned nothing has changed in the pipeline since your last successful run, so I would like to ask you the following :

- Could you try to docker login with the same username and password in your local machine, and try pushing the image to your private repository and see if that works ?

- Would you try changing your pipeline to login and push to dockerhub instead, and see if you face the same authentication error ?

With the information above we'll be able to proceed with the investigation.

Thank you, [@Jan-Erik Stensli](/t5/user/viewprofilepage/user-id/4712589)

Kind regards,

Patrik S

comments: author: Jan-Erik Stensli
body: [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) Thank you for your response. I've tried to push to dockerhub, and that works. I have not yet been able to test pushing to our private repository from my local environment, since that repository only allows certain IP:s to push. I will reach out to the persons in charge of that repository and ask them to give me access. It's probably something in the setup on their end.

Best regards,

Jan-Erik


Tags: bitbucket-cloud

cloud

docker
Facing this issue while running bitbucket pipeline
Asked by Rohan Rana:

**`/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/mkdirs/make-dir.js:85`**  
**`} catch {`**  
**`^`**  
**`SyntaxError: Unexpected token {`**  
**`at createScript (vm.js:80:10)`**  
**`at Object.runInThisContext (vm.js:152:10)`**  
**`at Module._compile (module.js:605:28)`**  
**`at Object.Module._extensions..js (module.js:652:10)`**  
**`at Module.load (module.js:560:32)`**  
**`at tryModuleLoad (module.js:503:12)`**  
**`at Function.Module._load (module.js:495:3)`**  
**`at Module.require (module.js:585:17)`**  
**`at require (internal/module.js:11:18)`**  
**`at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/mkdirs/index.js:3:44)`**


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

Could you share some more details regarding this issue, so we can better help you?

* What command are you executing in Pipelines when you get this error?  

* What is the full output of the command? (please make sure to mask/remove private/sensitive data from the output, if any, prior to sharing)  

* Do you get the same error if you debug the build locally with Docker?

This is a good way to narrow down whether the issue seems to be specific to Pipelines or not.

You can debug this locally the following way:

**1.** Take a new clone of the repo on your machine (clone the branch where this build is running)

**2.** Navigate to the directory of that new clone, and do a **git reset --hard** to the commit of the failed build with the issue (if it's not the last commit)

**3.** Afterwards, start a Docker container with the following command

```
docker run -it --volume=/Users/myUserName/code/my-repo:/localDebugRepo --workdir="/localDebugRepo" --memory=4g --memory-swap=4g --memory-swappiness=0 --cpus=4 --entrypoint=/bin/bash python:2.7
```

Replace **/Users/myUserName/code/my-repo** in the command with the path of the clone you took on step 1.  
Replace **python:2.7** in the command with the Docker image that you use to run this build.

**4.** After the Docker container starts, you can run the commands of the script in your yml file and observe the output.

Do you get the same error in the output?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
vs studios upload_files
Asked by UTLS United Through Life?s Struggles:

Im trying to upload my files to NFT port and when I hit the upload file command im getting a Catch error 403. can anybody help me with this problem


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

Could you explain what this has to do with Bitbucket?


Tags: bitbucket-cloud

cloud
How to get a response for the following request?
Asked by Amiya Kumar Sahoo:

I was using Oauth for authenticating with bitbucketCloud while integrating it with a application.  
I was following this doc: <https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/>  
I needed the auth_token which could be generated using this GET call as per the doc: "<https://bitbucket.org/site/oauth2/authorize?client_id={key}&response_type=token>"  

In browser I am able to get the call_bacl url response (generating the auth token) but in my application I am not getting any response. It is giving me 401 unauthorized error even if the connection is successful.  

Kindly help me with this? How to make this above call work?  

<br />

Thanks  
Amiya  


Answers:
author: Theodora Boudale
body: Hi Amiya,

I'm not 100% sure, but I think that the call to [https://bitbucket.org/site/oauth2/authorize?client_id={client_id}\&response_type=token](https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token) may work on browser only.

I would suggest posting your question in the developer community forum as well, which is specifically for questions related to Cloud development for Bitbucket:

<https://community.developer.atlassian.com/c/bitbucket-development/bitbucket-cloud/13>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud