youngmon/atlassian-qna huggingface dataset:
How to propagate new bamboo tasks into remote agents?
Asked by Kepio:

I am developing a set of tasks for bamboo and regularly try them on a live installation with remote agents - the problem I am facing is that the latest version of the plugin do not get downloaded automatically by the remote agents. The plugin is a V2 plugin, uploaded via the Install function of the UPM. I tried bumping up the plugin version without success ( the first task failed, bamboo claining that there was no such task in the plugin). Re-starting the agent provoles a download of the new version.

Surely I don't need to write a ssh script that will go into every remote agent to reboot them - or should I?


Answers:
author: Przemek Bruski
body: OK, it's confirmed bug, it will be fixed in 5.3.


author: Przemek Bruski
body: I think you do, sorry about that. I've opened [an improvement request for this:](https://jira.atlassian.com/browse/BAM-10990)

Edit: I've consulted the developer who has written the plugin 2 support and he said it should work. Could you tell me which version of Bamboo you're using and which module descriptors are used in your plugin?

comments: author: Kepio
body: Alternatively, could I copy my plugin into the plugins folder of the agent? Would the agent pick it up? or should I rename the current existing one?

It's actually something I was wondering : is there a way to upload a version 2 plugin on a bamboo instance without going through the web interface - the typical scenario here is after running atlas-mvn package, deploy the plugin on my local instance to test it out.


author: Kepio
body: I'm using Bamboo 3.4.3 and V2 plugin (tasks).

Let me know if you find a way to go about it - I experimented with one of your suggestion found [here](/questions/29420/best-way-to-reboot-agents-in-bamboo?page=1#29444), aka creating one plan with 1 job / agent (and adding a name property to all agents) and then restarting the agent in the background, but I'm not facing much success

```
echo "agent will restart soon"nohup sleep 10;/opt/bamboo/bin/bamboo-agent-init restart &exit 0
```

The plan seems to ignore the nohup and the \& and waits - the agent meanwhile shutsdown but does not come back up.


Tags: bamboo-app

remote-agent
Can not find personal access token section
Asked by Shashank Hegde:

![Screenshot 2021-09-20 084504.png](/t5/image/serverpage/image-id/160995i9D63B370F75230F2/image-size/large?v=v2&px=999 "Screenshot 2021-09-20 084504.png")


Answers:
author: DPKJ
body: [@Shashank Hegde](/t5/user/viewprofilepage/user-id/4563287) Welcome to the community

Personal access token feature is not available for Bitbucket Cloud, it is limited to Bitbucket Server/DC.

For Cloud, you can use [App Password](https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html) or [oAuth](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html)


Tags: bitbucket-cloud

cloud
Bitbucket slack integration notification user name
Asked by Victor Tuzov:

When I pushing commit to repo slack send me notification about it, but with another user name

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/160964i1686F8C3F5AE9230/image-size/large?v=v2&px=999 "image.png")

In the first case, I have the same "pusher" and "reporter" but in the second case they are not equals

Where I can change pusher?  
All my auths (bitbucket and slack) as "reporter"


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

Just to give you some context around the users that appear in the notification, the first one is the user who has access to bitbucket and pushed the code to the remote repository. The second user is the author of the commit, so this information comes from your git configuration.

With that said, in order to further understand what is happening on your side, could you please share the following information with me?

1. Do you have 2 Bitbucket accounts?  
2. The two Bitbucket accounts that you pushed these commits in the screenshot, do they both belong to you?  
3. If so, did you use a different machine when pushing the 2nd commit?  
4. Could you please run 'git remote -v' on your local repo and let me know if you see an SSH or HTTPS URL in the output?

Thank you.

Kind regards,  
Caroline

comments: author: Victor Tuzov
body: Thanks for the answer

Yes, I needed to remove all bitbucket credentials from windows credential manager


author: Caroline R
body: Hi, Victor!

I'm glad to know this is resolved! :)  
Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

integration

slack
Need help in running GC on my Repo
Asked by masade:

Hi, need help in running the following on my repo on server:

<https://bitbucket.org/masade/wow>  

git reflog expire --expire=now --all   
git gc --prune=now --aggressive  

My Local repo size is 109 MB, server repo size is 2.8 GB, we remove the large commits from the repo and pushed the same.  


Answers:
author: Theodora Boudale
body: Hi [@masade](/t5/user/viewprofilepage/user-id/4563036) and welcome to the community.

I found one repo owned by your workspace with a size of 2.6 GB, I ran a git gc on it and its size is 102.1 MB now.

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

Kind regards,  
Theodora

comments: author: masade
body: Thank you very much!


Tags: bitbucket-cloud

cloud
ECS Deploy - task-definitions.json
Asked by Bailey Davis:

Hi,   
I keep getting the error "Not able to find task-definition.json in your repository."  

Any ideas?  

This is my file structure, the task-definitions.json seems to be in the right directory:

![Screenshot at Sep 19 09-53-45.png](https://community.atlassian.com/t5/image/serverpage/image-id/160947iB31A3CF5D1826765/image-dimensions/136x325?v=v2 "Screenshot at Sep 19 09-53-45.png")

This is my task-definitions.json:  

```
{

"family": "ecs-cvs-behaviour-staging",

"containerDefinitions": [

 {

"name": "cvs-behaviour-staging",

"image": "cvs-staging:$BITBUCKET_BUILD_NUMBER",

"portMappings": [

 {

"containerPort": 80,

"hostPort": 80,

"protocol": "tcp"

 }

 ],

"essential": true

 }

 ],

"requiresCompatibilities": [

"EC2"

 ],

"memory": "128"

 }
```

<br />

<br />

And this is my bitbucket-pipelines.yml:  

```
image: python:3.8.12-alpine3.14

pipelines:

default:

 - step:

name: Build Docker Container and Deploy to ECR

services:

 - docker

script:

 - docker build -t cvs-staging:latest .

 - pipe: atlassian/aws-ecr-push-image:1.4.2

variables:

AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION

IMAGE_NAME: cvs-staging

TAGS: $BITBUCKET_BUILD_NUMBER

 - step:

name: Deploy to ECS

script:

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

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: 'cvs-staging'

SERVICE_NAME: 'cvs-staging-service'

TASK_DEFINITION: 'task-definition.json'
```


Answers:
author: Bailey Davis
body: I am silly, turns out I had a blank space at the start of the task-definition.json file name.  
How embarrassing.

comments: author: denys.zvieriev
body: Was this example working?  
I make it similar and catch the exception.

Failed to update the stack. An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Container.image contains invalid characters.

<br />

It seems like task-definition doesn't apply $BITBUCKET_BUILD_NUMBER automatically.  
"image": "cvs-staging:$BITBUCKET_BUILD_NUMBER"


Tags: aws

bitbucket-pipelines

cloud
fatal can't access in Butbicket pipeline
Asked by Chirannjevi Panala:

I am getting "fatal can't access remote" error in bitbucket pipeline, i am using the below, I tried the host and credentials through the FileZilla, that works without any issues.  
image: atlassian/default-image:2  
pipelines:  
default:  
- step:  
name: 'Deployment to Staging'  
deployment: staging  
script:  
- apt-get update  
- apt-get -qq install git-ftp  
- git ftp init --user $SFTP_Username --passwd $SFTP_Password --insecure sftp://111.111.111.111/


Answers:
author: Syahrul
body: Hi [@Chirannjevi Panala](/t5/user/viewprofilepage/user-id/4561983)

Can you add -vv in the FTP commands for more verbose output and share it with me? Also, please remove or mask any unnecessary information before you share it.   

For example:

```
git ftp init -vv --user $SFTP_Username --passwd $SFTP_Password --insecure sftp://111.111.111.111/
```

This should give more information on why the FTP is failing to connect with your server.

I look forward to hearing from you.

Cheers,  
Syahrul


Tags: git
Bitbucket Pipelines: Using variable with pipe command
Asked by glenn_comiskey:

Hi, I use the Git Secrets Scan in all my pipelines using the hard coded command:

- pipe: atlassian/git-secrets-scan:x.y.z.

This requires me to update each pipeline a new version of Git Secrets Scan is released. Is there a way to pass the docker image or pipe command using a variable:

Workspace Variable: GIT_SECRETS_SCAN = atlassian/git-secrets-scan:x.y.x

- pipe: $GIT_SECRETS_SCAN

Workspace Variable: GIT_SECRETS_SCAN = pipe: atlassian/git-secrets-scan:x.y.z

- $GIT_SECRETS_SCAN

TIA.


Answers:
author: Caroline R
body: Hi, [@glenn_comiskey](/t5/user/viewprofilepage/user-id/2539028)!

Thank you for reaching out to Atlassian Community!

Currently, Bitbucket Pipelines doesn't support variables for the Pipe name in the bitbucket-pipelines.yml file. However, we already have a feature request to add this option as you can see here:

* [https://jira.atlassian.com/browse/BCLOUD-20657](https://t.co/4RKmqMwVh4?amp=1)

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-pipelines

bitbucket-cloud

cloud
how to git from my repository to the production server
Asked by Rohith J Thomas:

i have created a local branch for my django application and i committed the changes to the bitbucket branch repo . Now i want to pull the changes that i made to my branch repo to get deployed on my ubuntu server hosted in amazon ec2. can any one please help me from getting this process done. i have not used git before i used to make changes direct in the server application.


Answers:
author: Syahrul
body: Hi [@Rohith J Thomas](/t5/user/viewprofilepage/user-id/4562522)

Welcome to the community.

If I got this right you wish to pull/push your changes over to your Amazon EC2 instance? If yes, then I believe the following KB should help use by using Bitbucket pipeline CI/CD at:

* [Deploy to AWS with CodeDeploy](https://support.atlassian.com/bitbucket-cloud/docs/deploy-to-aws-with-codedeploy/)

You need to configure your EC2 instance with CodeDeploy to enable the deployment as the following guide:

* [Create EC2 instance with CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-ec2-create.html)

I hope this helps.

Cheers,  
Syahrul
Can I use bitbucket variables with node.js process.env in my create-react-app?
Asked by Roman Schepkin:

Hi.

I use the create-react-app and bitbucket pipeline. I have defined bitbucket variables in repo settings, but Bitbucket Variables in my js code are undefined. I'm trying to call process.env.URL(my variable in bitbucket) when process.env.NODE_ENV is in production mode.

What's wrong with my expectations? Can I use it in my code? Could this be a bitbucket problem?

I would be grateful for any help. Thanks a lot.


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

It looks like you have defined a **Repository variable name** (process.env.URL) and you are trying to call a different variable name (process.env.NODE_ENV) in your code, is that correct?

In order to troubleshoot the issue further, could you please share the following information with me?

1. The repository variable name;

2. How you are using the variable name in your code. Please share the entire line of the code;

Thank you.

Kind regards,  
Caroline


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

variable
Bitbucket Enterprise HA Using AWS FSX Ontap NFS
Asked by D Wisneski:

Hi,

Can Atlassian please respond to the performance feasibility of AWS FSX Ontap as an NFS solution for HA Bitbucket enterprise: <https://aws.amazon.com/fsx/netapp-ontap/>? AWS FSX Ontap was just announced/released by AWS in September 2021.

Thank you,

Best Regards,

-dkw


Answers:
author: M. Hartmann
body: There is also a ticket for that you can vote for: <https://jira.atlassian.com/browse/BSERV-13006>


Tags: bitbucket-server

enterprise

server
Upgrade BitBucket to latest LTS
Asked by eric.buttrum:

Hello,

Very new to Bitbucket and Atlassian in general and sorry for the very noob questions. We are looking to upgrade our installation of Bitbucket server. We are currently using Bitbucket server v6.0.1 on OEL 7.x. We want to to upgrade to the latest LTS version. Where can find I the install files to download? Can we do the upgrade in one step or do we have to perform the upgrade in steps? Also, where can I find documentation for this process?

Thanks,

Eric. :)


Answers:
author: Ravi Sagar _Sparxsys_
body: Hi [@eric.buttrum](/t5/user/viewprofilepage/user-id/4551092)

Here is the [link](https://www.atlassian.com/software/bitbucket/download-journey) for you or you can find all the files [here](https://bitbucket.org/product/download-archives).

You should be able to upgrade directly. Follow this [page](https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html) for more details.

Ravi

comments: author: eric.buttrum
body: Great. Thanks very much.


Tags: bitbucket-server

server
Automatically trigger Pull Request build if target branch updated
Asked by weynhamz_cit:

It makes sense to automatically trigger the Pull Request build if target branch updated, right?


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

Considering that a pull request pipeline merges the destination branch into the source branch and then runs on this merge commit, the request makes sense.

I went ahead and created a feature request for this in our issue tracker:

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

I would suggest that you add your vote in that feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

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

Kind regards,  
Theodora


Tags: bitbucket-pipelines

bitbucket-cloud

cloud
How can I move only some issues from one bitbucket repo to another?
Asked by Enrico Spinelli:

I have a repository with more than 200 issues and I want to move just 10 of them to another repository.

The only way I found is to move all the 200 issues with this procedure <https://support.atlassian.com/bitbucket-cloud/docs/export-or-import-issue-data/> and then delete the unnecessary issues one by one.

Is there a better way?


Answers:
author: Theodora Boudale
body: Hi [@Enrico Spinelli](/t5/user/viewprofilepage/user-id/4561795) and welcome to the community.

One thing you can do is follow the export-import process from the documentation you followed, and then write a script that will delete unnecessary issues using our API:

* <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/issues/%7Bissue_id%7D>

Issues are identified by their id, so you can note down the ids of the 10 ones you want to keep. In the script, you can retrieve all issues from the issue tracker where you made the import with this endpoint:

* <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/issues>

and delete the ones with an id other than the 10 ones you want to keep.

Another way would be to edit the db-2.0.json file in the zip file you exported:

* <https://support.atlassian.com/bitbucket-cloud/docs/issue-import-and-export-data-format/>

and leave only objects related to the 10 issues you want to keep. However, due to the volume of the issues, this may be a more error-prone process.

Kind regards,  
Theodora


Tags: bitbucket-cloud

export

import

issue
how to inspect branch permissions (without admin access)
Asked by marcus.helbig:

I'm working in a repository which was setup and is managed by someelse. I know that there are permission for specific branches.  
How can I inspect these?

*** ** * ** ***

The following does not work, as I 'm missing the "Settings" option due to lack of access rights.

1. Go to a repository in a project.
2. Choose Settings \> Branch permissions


Answers:
author: Karthick S
body: Hello [@marcus.helbig](/t5/user/viewprofilepage/user-id/2417833),

Thank you for reaching out to Atlassian Community!

Currently, there is no way to determine the branch permissions without having admin access to the repository.   

You may request to provide you admin access from your team.  

Kind regards,  
Karthick S

comments: author: Dieter Guthmann
body: A suggestion in Bitbuckets Jira-Project:

<https://jira.atlassian.com/browse/BSERV-9350>

maybe enough votes would help


Tags: bitbucket-cloud

cloud
Problem with cloning repository in ubuntu
Asked by Amin:

Hi guys,

I have a problem with cloning my repository in Linux. I've added my user.name and user.mail in global config in git. My git version has been updated to 2.33. I disabled all 2step-verification, etc. in my bitbucket account

It works fine on windows but git directs me to authenticate my account with a third-party app (auth0) which I don't want to do. I just want to use git clone simply through HTTP by entering my username and password without any further authentication. I'd be appreciated if someone can help me. The error is:

Cloning into 'test_project'...  
Password for 'https://{my_username}@bitbucket.org':  
remote: You'll need to authenticate with a valid app password. You can create an app password from your account at <https://bitbucket.org/account/admin/app-passwords>  
fatal: unable to access '<https://bitbucket.org/testproject/test_project.git/>': The requested URL returned error: 403

Btw, git clone works fine with my other bitbucket account from work. The problem is only with this account, so I think it could be a bug or some problems with the setting of my account.


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

We are deprecating Atlassian account password for Bitbucket API and Git activity:

* <https://bitbucket.org/blog/deprecating-atlassian-account-password-for-bitbucket-api-and-git-activity>

I am quoting from the blog post:
> Starting Sep 13, 2021, new Bitbucket users will not be able to use their personal Atlassian account password when using Basic authentication with the Bitbucket API or Git over HTTPS. They will need to use Bitbucket app passwords.
>
> Bitbucket users who created an Atlassian account before September 13, 2021 will be able to use their Atlassian account password to authenticate with the Bitbucket API or Git until March 1, 2022.

I can see in our system that the Bitbucket account with the same email as your community account was created after 13th September 2021, which is the reason why authentication with a password fails. I assume that your work account was created earlier than this date, which is why you can still use its password for clone/pull/push operations.

You will need to generate an app password for the new Bitbucket account, which you can use for authentication when cloning/pulling/pushing to repos via HTTPS:

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Build failing when updating to Drupal 8.9.19
Asked by John Jones:

CI build is failing with the updated to Drupal 8.9.19. No idea what the error means. This is just one example of what looks likes dozens of errors that could not install.

Project in running Drupal 8.9, Composer 2, PHP 7.3

Failed to extract consolidation/self-update: (9) '/usr/bin/unzip' -qq '/opt/atlassian/pipelines/agent/build/vendor/composer/tmp-2deb2f71c02531c0c4c325d645f52a4d' -d '/opt/atlassian/pipelines/agent/build/vendor/composer/98406dfb'  
unzip: cannot find or open /opt/atlassian/pipelines/agent/build/vendor/composer/tmp-2deb2f71c02531c0c4c325d645f52a4d.  
This most likely is due to a custom installer plugin not handling the returned Promise from the downloader  
See <https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb> for an example fix  
Install of consolidation/self-update failed  
Failed to extract dflydev/placeholder-resolver: (9) '/usr/bin/unzip' -qq '/opt/atlassian/pipelines/agent/build/vendor/composer/tmp-2d79b64ea94727df655cd0657e187989' -d '/opt/atlassian/pipelines/agent/build/vendor/composer/66acf24a'  
unzip: cannot find or open /opt/atlassian/pipelines/agent/build/vendor/composer/tmp-2d79b64ea94727df655cd0657e187989.

*** ** * ** ***


Answers:
author: John Jones
body: Never mind, fixed!

comments: author: rondewit
body: I'm interested to know how you fixed it, since I have roughly the same error message. Did you downgrade to Composer v1? Thanks!


Tags: bitbucket-pipelines
Bitbucket Server Pull Request POST API Response body is wrong in documentation.
Asked by Sayantan Ghosh:

Hi, when I tried to create a Pull Request in my destination server , **I got a 400 error that says author is not expected.**

**When I remove the author key, it successfully executed with a 201 response code**. when I include the author key in my response body it always throw a 400 error. Please review the given response body in the documentation. It has a bug.

Please find the given author section from the screenshot and validate it.

![Screenshot_20210917-015029667.jpg](/t5/image/serverpage/image-id/160654iEAF245C856396E99/image-size/large?v=v2&px=999 "Screenshot_20210917-015029667.jpg")

Documentation Link -

<https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8287391664>


Answers:
author: Christian Glockner
body: Hi Sayantan,

The response body is what the server responds with. You need to look at the sample listed under *Example request representations.*

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Sayantan Ghosh
body: Hi [@Christian Glockner](/t5/user/viewprofilepage/user-id/527595) , I have seen the sample response body.

But one thing I would like to address, I have getting the server response and modifying its key values in order to migrate the Pull Requests from Source server to destination server. And strangely, it worked fine and the pull request is successfully migrated.

But the only problem is whoever is doing the migration , in the destination server the name of the pull request creator is replaced by the migrator name.

That's why , when I am trying to pass the author key, it's says error. Then it means there's no way I can properly migrate a pull request of a repository??


Tags: bitbucket-server

rest-api

server