youngmon/atlassian-qna huggingface dataset:
What is the purpose of folders created in /tmp by Bamboo
Asked by Jan Swaelens:

Hello,

We are on Bamboo 4.2 (same behavior was noticed on earlier versions too) and notice a bunch of folders being created by Bamboo in the /tmp folder of our server instance.

These folders are named \[Project Key\]-\[Plan Key\] and seem to contain no files.

We are wondering what the purpose of those files is and why they seem to be empty. Out IT staff would also like it very much to get rid of them (as they seem to contain no files).

Also, is there something to configure in terms of an alternate location?

Thanks for your insights


Answers:
author: Jan Swaelens
body: Those folders are created because they are passed to java processes as value for 'java.io.tmpdir'. By default the plan key is added as a sub folder to the default system setting for 'java.io.tmpdir'.

It is possible to specify an alternate folder by means of the Java system property 'bamboo.build.parent.java.io.tmpdir' (which is what we are doing now to have the temp folders created on our data partition instead of the os partition).

comments: author: Richard Cross
body: Far better to launch the agent pointing at a more suitable tmp location, than to require end users to define it in their build plans. You can do this by editing the wrapper.conf and adding in the following line:

wrapper.java.additional.*n*=-Djava.io.tmpdir=/my/alternate/path/tmp

where *n* doesn't clash with similar lines in the same file.


author: Jan Swaelens
body: Thanks Richard, I had to revisit this because some plugin we are using is using that tmp location more than before.

Using the wrapper configuration file works but it is quite the hassle to apply this to all our agents. Any chance this option can be passed using a Java system variable which can be passed during agent startup, we have scripts for that which can easily pass the right one automatically.

tx

jan


author: Richard Cross
body: We manage this by using SaltStack to provision all our agents, but you could just as easily use Puppet, Chef or Ansible.

That said, it doesn't completely solve the problem; we still have issues with NPM and Apache Spark related tasks, which leave hundreds of directories/files in /tmp, that are never cleaned up.


author: examplesbdev example
body: I want to run salt commands from my bitbucket_pipeline.yml to some Servers hosted in AWS cloud. Could you please provide me some code examples which will help me to give the initial start?


author: Cameron Ferguson
body: Sounds like to me that's where your builds are happening....

If you have the miscellaneous options for your jobs set to, "Clean Working Directory after build" then it would contain no files...

How are you launching the bamboo agent? Are you specifying "-Dbamboo.home=/bamboo/dir" when launching the agent jar file?

comments: author: Jan Swaelens
body: We have bamboo.home set to an alternate location, the builds are happening there. I think I'm gonna deep dive in the code to see where those folders are coming from :-)
Tried to open and edit a bitbucket-pipelines.yml file, cannot open, got spinning wheel instead.
Asked by Jin Fan:

Tried to edit a bitbucket-pipelines.yml file, clicked the Edit button, the file is not open and got spinning wheel instead.


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

Indeed, Bitbucket had an incident that affected pipelines, but the dev team has already resolved this issue as you can check on our status page:

* <https://bitbucket.status.atlassian.com/incidents/wcdkt7cg3tvc>

Could you please test it now and confirm if everything works fine for you?

Looking forward to hearing from you.

Kind regards,  
Caroline

comments: author: Jin Fan
body: yes, it went back to normal yesterday after I reported the incident.


author: Caroline R
body: Thanks for the confirmation, Jin!


Tags: bitbucket-cloud

bitbucket-pipelines
ssh-run: running script on remote server hangs
Asked by aslane:

Hello -

I am trying to configure a bitbucket pipeline using a runner to run on an AWS EC2 instance. I have the runner up and running via the command supplied when creating the runner.

I came across the ssh-run pipe and thought that might be a good solution for this task, especially because a lot of the examples have ec2-user as SSH_USER.

I want to configure a simple git pull command on the ec2 instance, yet the pipeline just hangs at \`ssh -A -tt -i /root/.ssh/pipelines_id -o StrictHostKeyChecking=no -p 22...\`

Here is the pipeline yaml file along with the script it is attempting to execute.

image: atlassian/default-image:2

pipelines:  
default:  
- step:  
runs-on: self.hosted  
script:  
- pipe: atlassian/ssh-run:0.3.1  
variables:  
SSH_USER: 'ec2-user'  
SERVER: \<ec2 IP addr\>  
MODE: 'command'  
COMMAND: \<script on ec2 instance\>

script (on the ec2 instance):

#!/bin/bash

git -C \<path on ec2 instance\> pull

Thank you.

EDIT:

just a silly ssh/bitbucket auth issue...works as expected now.


Answers:
author: Igor Stoyanov
body: [@aslane](/t5/user/viewprofilepage/user-id/3673439) hi. So do you solve you problem? If yes, consider to move your edit comment as separate response and mark it as answered.

Regards, Igor.


Tags: bitbucket-pipelines

cloud

ssh
How to move a repo with git lfs to a new project?
Asked by Matt Schuckmann:

I've got a couple of git repos that have \`git lfs\` turned on and I'd like to move them to a new project in Bitbucket. However bitbucket is telling me that I cann't move them because of \`git lfs\` support, why is that and what can I do about it.

<br />

BTW, I'm not really sure that these repos really need \`git lfs\` support as the files in lfs are only a couple of MB each.


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

Thank you for reaching out to Atlassian Community!

Currently, the transfer of repositories with Git LFS files is disabled, this is a [limitation for Git LFS](https://support.atlassian.com/bitbucket-cloud/docs/current-limitations-for-git-lfs-with-bitbucket/). However, we have a workaround for that:

Instead of transferring the repo, you can clone the repo to your local machine, then create a repo in Bitbucket, and push to that.

When you do this, all files and the Git history will be available in the new repo, but the metadata for such things as issues, pull requests won't be copied over. Furthermore, you'll have to set up users and access permissions for the new repo.

1. Clone the Git LFS repo to your local machine as usual:

2. Fetch the Git LFS history:

       git lfs fetch --all origin

3. Create a new repo in Bitbucket.

4. Add a remote locally that points to the new repo:

       git remote add new-origin <URL to new repo>

5. Now push to the new repo:

       git push -u new-origin --all

   This pushes the repo and its refs for the first time.
6. Push Git LFS data to the new repo:

       git lfs push --all new-origin

7. Finally, update the remotes for the new repo:

       git remote set-url origin <URL to new repo>git remote set-url --push origin <URL to new repo>

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

Kind regards,  
Caroline

comments: author: Arvid Berndtsson
body: And if you have multiple branches, don't forget to include them when you clone!  

Add \`--mirror\`


Tags: bitbucket-cloud

cloud

git-lfs

project
Branch Restrictions allowing Bamboo Repository Commits
Asked by Curtis:

We are currently running Bitbucket Server along with Bamboo. I am looking to have Bamboo upon a successful deployment, perform a commit to the release branch in the repository. We use Bitbucket's Branch permissions to prevent rewriting history and deletion, and changes only through Pull Request. You can add a user as an exception, but I don't see the user Bamboo uses (Atlassian Bamboo) as an option to select as an exception user.

Bamboo uses Crowd for authentication which connects to AD to get our users that can authenticate.

The setup in the Bamboo Plan is using the *Repository commit* task to perform the commit and push the changes to Bitbucket. Bamboo and Bitbucket are linked, via the standard Atlassian method and the repository is a *Linked Repository* in Bamboo.

What are your best ideas on how to either get the Bamboo user to be added as an exception? Or a better way to go about performing the commit? Or any other solution that I'm not seeing.


Answers:
author: Curtis
body: The desired feature is already supported and built into Bitbucket and Bamboo. Bamboo upon linking to a Bitbucket repository, automatically creates and adds an access key into the repository in Bitbucket. In viewing the *Linked Repository* I saw the key and knew it was then existing in the matching Bitbucket repo.

Upon doing some web searching, I found [this article](https://www.atlassian.com/blog/bitbucket/add-access-keys-branch-permissions-bitbucket-server-4-14), which shows a key being added directly to the branch permissions.

I had numerous times typed *bamboo* into the field, but the key had never shown up. When Bamboo creates keys, it gives them the name of Bamboo's URL. The filtering did not work to match anything in the URL other than the start of the name, with is *http*.

Knowing this, I was able to add the *access key* Bamboo created to the repository, and can grant only Bamboo access to make changes to a *release* branch without a Pull Request.

comments: author: Ulrich Kuhnhardt _IzymesCo_
body: Awesome - thanks for sharing your solution.


Tags: bamboo

bitbucket-server

server
How do I export the Bitbucket user and last user login date ?
Asked by david wong:

How do I export the Bitbucket user and last user login date

I need to clean up the bitbucket user list.


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

Currently, we don't have a feature that allows workspace administrators to collect this information, however, we already have a feature request that is **in progress** to implement this in Bitbucket Cloud:

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

I see you are the admin of a workspace, so while this feature is not available, you can open a ticket with us so we can share this list with you. As you have access to a workspace that is under a paid plan, you should be able to open a support ticket with us.

I went ahead and created an internal ticket for you using the email of your community account. 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.

For future cases, you can open a support ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as the product. Please make sure to give the URL of the workspace under the paid plan.

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

Kind regards,  
Caroline


author: dlaser
body: Bitbucket Cloud has released this [User Export Feature](https://confluence.atlassian.com/display/BBKB/Exporting+user+list+from+your+workspace?moved=true&showComments=true). This exports your users into a CSV file. Last Login Time is one of the fields exported.


Tags: bitbucket-cloud

cloud
Deprecating Atlassian account password for Bitbucket API and Git activity
Asked by Nikolay Atanasov - NOAA Affiliate:

Does the Deprecating Atlassian account password for Bitbucket API and Git activity will affect the Bitbucket server users account passwords and the authentication from Bamboo server to Bitbucket server in Linked Repositories


Answers:
author: Riste Laboski
body: [@seanaty](/t5/user/viewprofilepage/user-id/1301071)

We are using bitbucket as maven repository for storing libraries .

In the bitbucket pipelines in order to fetch these libraries we are using settings.xml were we store the credentials as shown below :

```
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <servers>
        <server>
            <id>bitbucket.downloads</id>
            <username>username@xxxxxxxx.com</username>
            <password><defaultAccountPassword></password>
        </server>
    </servers>

    <profiles>
        <profile>
            <id>bitbucket-downloads</id>
            <repositories>
                <repository>
                    <id>bitbucket.downloads</id>
                    <name>bitbucket downloads</name>
                    <url>bitbucket://xxxxxxxxx/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>bitbucket-downloads</activeProfile>
    </activeProfiles>

</settings>
```

Are we going to be able still to use this approach after 1 of March or we need to change the implementation and use app password instead.  

thanks in advance


author: seanaty
body: This change is only affects Bitbucket Cloud.

comments: author: Nikolay Atanasov - NOAA Affiliate
body: Thanks


author: Nikhil Jacob
body: [@seanaty](/t5/user/viewprofilepage/user-id/1301071) I use my Atlassian id to configure my bitbucket repositories in Jenkins and my local machine. Will this change affect my access to these repositories?


author: seanaty
body: Access to repos is not changing. But you may in fact need to make a (quite simple IMO) change if you don't want any interruption and you're free to make that change now.

Say you're using curl to access the API.

Instead of doing this:

```
curl -u my-username:my-password https://api.bitbucket.org/2.0/my-username/repositories
```

you'd do this:

```
curl -u my-username:my-brand-new-app-password https://api.bitbucket.org/2.0/my-username/repositories
```

So you'll need to swap out "my-password" with "my-brand-new-app-password"

Going forward you password will be only for creating an interaction session on bitbucket.org (the website) and all other forms of authentication (git, API) will require an app password.


Tags: bamboo

bitbucket-server

server
Simultaneous execution to the same branch
Asked by Vladim?r Jan?ich:

Hello,

I'm wondering if it's possible to execute the same step in the pipeline to the same branch at the same time? If my pipeline is still in progress and somebody else make commit to the same branch, pipeline is paused until resumed manually. Is it possible to make execution parallel for the same branch? Or is it possible to configure pipeline to automatically resume paused pipeline?

Thank you


Answers:
author: Theodora Boudale
body: Hi Vladim?r and welcome to the community.

This behavior occurs for ++deployment steps++ only, steps that have the deployment keyword in the yaml file, e.g. like follows:

```
- step:
    name: Deploy to production
    deployment: production-east
    script:
      - python deployscript.py prod
```

Concurrently deploying multiple things to an environment may cause problems. When a deployment to a certain environment is in progress and another deployment to the same environment is triggered, then the second deployment will get paused. You can read more info about this in the following documentation:

* <https://support.atlassian.com/bitbucket-cloud/docs/concurrency-control/>

I'm afraid that it is not possible to automatically resume paused builds at the moment, we have a feature request in our issue tracker:

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

I would suggest adding your vote in the 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

comments: author: Vladim?r Jan?ich
body: Hello Theodora,

thank you for answer, it's a pity it's not possible to auto resume paused pipeline, but we will be migrating to GitHub soon anyway, so I'm ok with manually resuming pipeline.

Thank you


Tags: bitbucket-cloud

cloud
Why Cannot dowload the artifact from bitbucket
Asked by fatma_elbehi:

After running the pipeline I received the following information

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


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

Thank you for reaching out to Atlassian Community!

This is happening because artifacts have a limit of 1 GB. I checked our [Artifacts documentation](https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/) and confirmed this information is not clear there, so I created an internal ticket to update this information.

Please feel free to share any additional questions or concerns regarding this subject.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
JIRAID to push commit to Bitbucket
Asked by Casey Moeslein:

I am having troubles pushing code to my bitbucket. I am currently using IntelliJ to push my code and getting the following error message:

remote: The commit message should have a valid JIRA Issue key for all commits that are part of your push  
remote: This commit message 'v765067 added product code' is missing jiraid or has an invalid jiraid

It seems like I have to create a JIRA ID. How do I go about doing that?

I am new to using Bitbucket so would like any help I can get! I might have missed a step in the process.


Answers:
author: Robert Wen_ReleaseTEAM_
body: Hello [@Casey Moeslein](/t5/user/viewprofilepage/user-id/4620519) ! Welcome to the Atlassian Community!

Your commit message should start with the ID of the Jira issue. So, if you were using the git command line:

git commit -m "JIRA-123 This is what a Jira ID looks like"

comments: author: Casey Moeslein
body: Thank you for your response. Where do I find the Jira issue id?

My current process is going into IntelliJ -\> uploading my sql file -\> commit to my branch -\> push commit


author: Robert Wen_ReleaseTEAM_
body: Let me answer your question with some questions.

So what kicks off this process? Are you assigned a Jira issue to do the development work? If so, use the ID of that Jira issue in your commit message. If you don't know, talk to your project manager/tech lead/scrum master for starters.


author: Casey Moeslein
body: No, I am not assigned any number


author: Nic Brough -Adaptavist-
body: You'll need to ask the project leaders what to put in (you may not need to be assigned, but the Jira ID is a reference to the story under which your work should be tracked)


Tags: bitbucket-cloud

cloud
How to exclude certain files with git-secret-scan
Asked by faraz.younus:

I'd like to scan \*.hcl and .\*yml but dont want to scan some hcl files, how can I use exclude option in the pipeline ?


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

There is no option to exclude some files. But you can use your own written reqexp that allows you to scan only needed files. Maybe this can [article](https://stackoverflow.com/questions/5540398/regular-expression-exclude-list-of-words-for-a-name) help you. Look how to use CUSTOM_PATTERN in advanced example in [readme](https://bitbucket.org/atlassian/git-secrets-scan/src/master/)

Regards, Igor.


Tags: security

bitbucket-pipelines

cloud

exclude

git
Unable to create a team
Asked by zeexiong:

Hello,

I am using this link <https://bitbucket.org/account/create-team/> to create a team. The Workspace ID is available and I have inputted a name for the team, but whenever I hit the "Done" button, it just leads me back to the same form page I was on. Then it removes the Workspace ID, but leaves the team name as if I submitted the wrong field.

<br />

Is there a proper way of creating a team?


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

In April 2020 we unified the user and team model into workspaces:

* <https://bitbucket.org/blog/introducing-workspaces>

A workspace was created automatically then for every existing user and team account and users can now create workspaces (instead of teams).

The link to create a workspace is the following:

<https://bitbucket.org/workspace/create/>

You can also find it if you log in to <https://bitbucket.org/>, go to your avatar \> **All workspaces** \> select **Create workspace** (on the top right corner).

Kind regards,  
Theodora

comments: author: seidnerj
body: For people coming here later...

The up to date link to create a workspace is <https://bitbucket.org/account/workspaces/>

Also,I wasted so much time trying to create a team using the above link (<https://bitbucket.org/account/create-team/>) but it doesn't give any error, simply reloads the page. If teams don't exist, then kill this page or give an error message - this was so annoying!


author: Theodora Boudale
body: Hi,

We recently changed the way workspaces are created in Bitbucket. The way to create a workspace now is from <https://admin.atlassian.com/> within an Atlassian organization on that page.

The steps are listed on this page:

* <https://support.atlassian.com/bitbucket-cloud/docs/create-your-workspace/>

They are the following (for easier reference):

1. Go to the following URL: [admin.atlassian.com](http://admin.atlassian.com/)

2. Log-in to your Atlassian Administration account.

3. Select the **Products**tab on the top navigation bar.

4. Select the **Add product**button.

5. Select **Bitbucket**from the list of products.

6. Name your workspace. Workspace ID is auto-created in accordance with your workspace name.

7. Select the **Agree and add**button to create your workspace in Atlassian Administration and agree to the Atlassian Cloud Terms of Service and Privacy Policy.

I will reach out to my team internally regarding the page the <https://bitbucket.org/account/create-team/>.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Switched from https to SSH - fatal error: "does not appear to be a git repository"
Asked by larsburkhardt:

Hello,  
I want to move from https to a ssh connection and followed the guide - created a key pair and uploaded the public key to Bitbucket and so on. Used the following guide: <https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/>  

When I know want to push any changes to one of my repositories, I get the error "*fatal: 'git@bitbucket.org/larsburkhardt/knaeckebrot1.git' does not appear to be a git repository*"

The path should be correct, here a screenshot of my console on Windows:

Edit: Works now, I needed to change from a slash to the other writing with ":". Now it seems to work, could push now.

![screen_bitbucket-console.png](/t5/image/serverpage/image-id/167502iFD3EACB1D85E8858/image-size/large?v=v2&px=999 "screen_bitbucket-console.png")

What is the problem?  
Thanks in Advance,  
Lars


Answers:
author: Bastian Stehmann
body: Hi [@larsburkhardt](/t5/user/viewprofilepage/user-id/4618964) ,

Great to hear that you could fix it yourself.


Tags: cloud