youngmon/atlassian-qna huggingface dataset:
Bitbucket Pipeline does not trigger on push
Asked by Lav Shah:

I have the following Bitbucket Pipeline in place.  
But whenever I push to the master branch it does not trigger the pipeline.  

I need to manually trigger the pipeline, and if I do so it works fine. But I want to make sure on every commit it triggers the pipeline automatically.  

Content of bitbucket-pipelines.yml  
Note: The code below is valid \& have checked it [here](https://bitbucket-pipelines.atlassian.io/validator)  

*** ** * ** ***

image: node:16

pipelines:  
branches:  
default:  
- step:  
name: Build \& Deploy to netlify  
caches:  
- node  
script:  
- npm install  
- npm run lint  
- npm run build-prod  
- apt-get update  
- apt-get install zip  
- ls -a  
- cd out  
- zip -r build.zip \*  
- zip -sf build.zip  
- curl --location --request POST "URL" --header "Content-Type:application/zip" --header "Authorization:Bearer Token" --data-binary "@build.zip"

<br />

<br />

<br />

*** ** * ** ***

![Bitbucket-Pipelines-Validator.png](https://community.atlassian.com/t5/image/serverpage/image-id/180560iF5F20FED3192DA2D/image-dimensions/738x387?v=v2 "Bitbucket-Pipelines-Validator.png")  
I've pipelines enabled as well, you can check that here:  
![front-end-Settings-?-Bitbucket.png](https://community.atlassian.com/t5/image/serverpage/image-id/180561i1BE755CEF3727B0A/image-size/large?v=v2&px=999 "front-end-Settings-?-Bitbucket.png")  
Also here are the request logs for the PUSH trigger of bitbucket.  
![front-end-?-Bitbucket.png](https://community.atlassian.com/t5/image/serverpage/image-id/180562i80A38E2C09395F7E/image-size/large?v=v2&px=999 "front-end-?-Bitbucket.png")  


Answers:
author: Lav Shah
body: UPDATE:  

Sometimes pipelines trigger with delay, so be patient with that and see after a few minutes, and in case of active bitbucket incidents, you can wait for it to get fixed.  

- Pipeline started triggering automatically the day after.  

That was strange and I also tried creating a new repository, but it didn't work there as well.


author: Pramodh M
body: Hi [@Lav Shah](/t5/user/viewprofilepage/user-id/4733201)

Welcome to the Community!!

Go ahead and try this starter template

```
#  Template NodeJS build
#  This template allows you to validate your NodeJS code.
#  The workflow allows running tests and code linting on the default branch.

image: node:16
pipelines:
  default:
    - parallel:
        - step:
            name: Build and Test
            caches:
              - node
            script:
              - npm install
              - npm test
        - step:
            name: Code linting
            script:
              - npm install eslint
              - npx eslint .
            caches:
              - node
```

Thanks,  
Pramodh


author: Ankit Gupta
body: Have you tried changing default to master?


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

trigger
App Passwords | Bitbucket
Asked by ChuckieAJ:

I had an email telling me to setup app passwords.

I use TortiseGit and Pageant.

I have created an App Password but now do I use it with ToirtoiseGit / Pageant?


Answers:
author: Norbert C
body: Hi [@ChuckieAJ](/t5/user/viewprofilepage/user-id/3394330)

Thank you for contacting Atlassian Support, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

I would like to inform you that in case you use TortoiseGit with HTTPS, it fetches the password from your Windows' Git Credential Manager.

Steps to reach it is:  

First, Go to Credentials like:

Right click ? TortoiseGit ? Settings ? Git ? Credential.

Then:

Select Credential helper: wincred - this repository only / wincred - current Windows user

Once you're there, feel free to change the password to the app passwords.

Related to Pageant: Pageant doesn't store the HTTPS password, this application is used for Git over SSH by storing your private keys.

Please let us know if you have any further question? We're here to help.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


author: salimabad
body: lumia nokia


Tags: bitbucket-cloud

cloud
App password
Asked by neilyoung2512:

The number of incoming mail increases the last weeks, warning about

"Beginning March 1, 2022, you will no longer be able to use your Atlassian account password when using Basic authentication with the Bitbucket API or Git over HTTPS. For security reasons, we require all users to use [Bitbucket app passwords."](https://click.e.atlassian.com/?qs=ef3a2d2bee673323868cdab9b19ceca8418085d9a7db1cc2597cfd5e1a081f3877252de207c2cbbcfb7d48842b4fac070956d64768b96c3b3915021483823c25)

I think this is a similar move as like Github did with the personal access token. I'm just wondering if this change also hits the web dashboard, or is this completely unrelated? Will I also have to use an "app" password instead of "ordinary" username/password authentication to access my projects via the web dashboard at <https://bitbucket.org/dashboard/overview>

Please clarify. Thanks in advance


Answers:
author: Norbert C
body: Hi [@neilyoung2512](/t5/user/viewprofilepage/user-id/2411911)

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

I would like to inform you that this chance doesn't affect your access to the Web Dashboard. This change is only applicable to your Bitbucket API and Git over HTTPS usage.

Please let us know if you have any further question? We're here to help.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Supoprt


Tags: bitbucket-cloud

cloud
App Password
Asked by qbrt:

Trying to figure out how to use the new feature "App Password" with the git command line to connect to bitbucket cloud repos on a Windows Server 2016.

I've created an app pwd with a label. Removed all the bitbucket related credentials from the Windows Credentials Manager. When I go and run "git pull" from CLI, I am asked to provide acct/pwd through a GUI. When I use the app label and password things do NOT work. Only if I use my Atlassian ID/pwd do things work. Where or how do I register the app label and password for the command line git utility?

Following this help doc does not help.

[App passwords \| Bitbucket Cloud \| Atlassian Support](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/?utm_source=alert-email&utm_medium=email&utm_campaign=bbc-login-deprecation_EML-12079&jobid=105398046&subid=1539803444)


Answers:
author: Anthony Vaughan Bartram
body: I'm trying to figure out the same thing.

Looks like this might be useful:

<https://stackoverflow.com/questions/39886995/how-to-access-bitbucket-using-app-password>

i.e. curl -u "username:\<appPassword\>" "[https://api.bitbucket.org/2.0/repositories/\[yourRepo](https://api.bitbucket.org/2.0/repositories/[yourRepo)\]"

Hope this helps.

comments: author: qbrt
body: Thank you for the suggestion.  

I've tried curl and adding the label:password to the remote URL via "git remote" without success.

How are people switching to this? Have a month left to figure this out.


author: qbrt
body: ooooooooookaaaaaaaaaay.... after closer inspection of the above suggestion, I used "username" and not "label" and it worked! Thank you.

So, once the app label and password are created: i.e. label = myapp; pwd = s3cre3t,

delete the credentials from the Windows Credentials Manager for git. I had two of them. Then at the command line type a git action that will force the Credentials Manager GUI to popup asking for git credentials. In the username -- do NOT use the email NOR the label (myapp). Must use the "username" of the Atlasian account. You will find the "username" on the "bitbucket profile settings". Then use the password for the newly created App label. i.e. s3cr3t

This info should be put in the Atlassian's help doc with much better wording than I have done here :). It's Friday night..ack.

[App passwords \| Bitbucket Cloud \| Atlassian Support](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/?utm_source=alert-email&utm_medium=email&utm_campaign=bbc-login-deprecation_EML-12079&jobid=105398046&subid=1539803444)


Tags: bitbucket-cloud

cli

cloud

git

windows
Standard plan - add the 6th user
Asked by azolee:

I have a Standard plan, and we have 6 bitbucket users. I would like to add the 6th user to access the repos, but I cannot find how.


Answers:
author: Brant Schroeder
body: [@azolee](/t5/user/viewprofilepage/user-id/4732675) welcome to the Atlassian Community

You must have a Bitbucket team to use projects and then you can organize your users in groups within the team to decide which repositories will they have access to. You can learn more about this at [Projects](https://confluence.atlassian.com/bitbucket/projects-792497956.html) and [Bitbucket Cloud Teams](https://confluence.atlassian.com/bitbucket/bitbucket-cloud-teams-321853005.html).


Tags: bitbucket-cloud

cloud

user
How to set the app password in Eclipse for bitbucket Repository
Asked by Peter Wokke:

From 1st of March the App Password is required to use to Fetsh and Push to the Bitbucket repository. Have created an App Password but when I use this password instead of het account password it is not accepted.

Where can I configure the App Password within the eclipse preferences to be able to access the repository after 1st of March?


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Peter Wokke](/t5/user/viewprofilepage/user-id/4732765) ,

in order to check/change your credentials in Eclipse, you need :

* Go to git perspective
* Expand your specific project (eclipse can retrieve information from multiple git/bitbuckets)
* Exande remote
* Right-click on fetch/push
* Enter username and password and confirm

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

Hope this helps,

Fabio

comments: author: Peter Wokke
body: [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528) I have tried this using my user name and the App Password.

This combi does not work. Using the user name with the account password does.

How does the repository know when you use the App Password iso the Account Password on bitbucket?


author: Peter Wokke
body: I used my email address and account password as my credentials. This works.

When using an app password you have to use your username with it.

Just a small different.


author: kgorlen
body: Change stored credentials has the User field greyed-out, so I cannot change it to my email address for use with an App Password.

Configure Fetch/Push-\>Change... allows me to edit User, but Save is greyed out for Fetch and Save is not effective for Push.

I'm running Eclipse Version: 2021-12 (4.22.0)


author: Glyndwr
body: A basic issue! I can not find git perspective. I am using EclipseIDE 2021-12.


Tags: atl-gruland

bitbucket-cloud

cloud

eclipse

password
How to make restricted task, resolvable only by reviewers or selected members
Asked by vats12:

I am adding comments and tasks automatically to the pull requests using the Rest apis.

But we need the task to be restricted to be resolvable only by the PR reviewers or a specific list of people.

Could you please help me out with this, it is a very urgent requirement?


Answers:
author: Mikael Sandberg
body: Hi [@vats12](/t5/user/viewprofilepage/user-id/4732363),

Welcome to Atlassian Community!

You cannot set restrictions on the task so only specific users can resolve it. I looked to see if there was a request to have this feature added, but could not find any, so the only thing I can recommend is that you go and add a new suggestion [here](https://jira.atlassian.com/secure/Dashboard.jspa?selectPageId=10440).


author: vats12
body: Hi [@Pramodh M](/t5/user/viewprofilepage/user-id/3691224)  
Thanks for your response.  
But I need to implement in a way when I add a task via rest API it is only resolved by the reviewers.

I don't have access to modify bitbucket settings.

Thanks.


author: Pramodh M
body: Hi [@vats12](/t5/user/viewprofilepage/user-id/4732363)

Welcome to the Community!!

Assuming this is a Bitbucket question, here's the solution - implement branch protection rules for your repository

<https://bitbucket.org/blog/take-control-with-branch-restrictions>

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

Thanks


Tags: bitbucket-cloud

cloud

task
large size file uploaded success but file not found in bitbucket
Asked by Glocom:

We tried to push 16GB Single zip file the push is completed successfully, After Completion wehn we check the repository in bibucket it's empty.


Answers:
author: Pramodh M
body: Hi [@Glocom](/t5/user/viewprofilepage/user-id/4732052)

Welcome to the Community!!

16GB? what are you trying to put there!!

Anyways 16GB at once cannot be pushed to the remote repo.

Follow the guide here to track the LFS files and push the commits in stages

```
REMOTE="https://username:password@git-clone-url"
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=100

# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
??? # if so, only push the commits that are not on the remote already
??? range=$REMOTE/$BRANCH..HEAD
else
??? # else push all the commits
??? range=HEAD
fi
# count the number of commits to push
n=$(git log --first-parent --format=format:x $range | wc -l)
# push each batch
for i in $(seq $n -$BATCH_SIZE 1); do
??? # get the hash of the commit to push
??? h=$(git log --first-parent --reverse --format=format:%H --skip $i -n1)
??? echo "Pushing $h..."
??? git push $REMOTE $h:refs/heads/$BRANCH
done
# push the final partial batch
git push $REMOTE HEAD:refs/heads/$BRANCH
```

Remember to check the LFS files with git lfs ls-files command

The above will push the repo from local to remote from the default branch

Let me know if you have any queries

Thanks
trailing space in app password
Asked by kfj:

When generating an app password, the password has a trailing white space. The password has to be used without the trailing white space. I think this may be a bug, even though it doesn't need much brains to figure it out.


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

Thank you for reporting this. I created a bug report for this in our issue tracker:

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

When there is an update, our development team will post it in that bug report.

Kind regards,  
Theodora
Can you undo a mirror decline?
Asked by Michael J_ Rossiter:

I declined my own mirror as the URL I had created was incorrect. Now I want to undecline the request! I can see a mirror that already exists but I want to add my new mirror and it won't accept it. When I press the button to enter the code that Bitbucket gives me it goes to a page that has a 404 error. I've hit a total dead end. Is there anyway to undo my mistake so that Bitbucket will see my mirror again?


Answers:
author: Michael Rossiter
body: Thought I'd answer myself in case it's helpful. I was running the mirror in a container. So you need to delete shared/data and shared/config in the docker container and re-start the process in order to get the authorisation to begin again.

<https://confluence.atlassian.com/bitbucketserverkb/how-to-re-install-re-register-a-single-bitbucket-smart-mirror-1026051544.html>


Tags: bitbucket-server

server
I'm not able to clone any repository from BitBucket.
Asked by Vignesh Palanikumar:

My organisation uses sso to login to BitBucket. I can login to bitbucket. But I cannot clone any repository. It says invalid credentials. I don't remember my password. And I'm not able to reset the password either. When I enter my email address to receive the reset link, sso happens at the back end and takes me back in to BitBucket. I need to reset the password. Can you please help me on this?


Answers:
author: Pramodh M
body: HI [@Vignesh Palanikumar](/t5/user/viewprofilepage/user-id/4731723)

Welcome to the Community!!

Remove the password from your local system first (If its Windows, the password will be stored in windows credentials, find the bitbucket one and remove it)

Next, create an App Password (Token) under your personal settings to authenticate to the remote repo, you should be able to clone the repository!!

Thanks

comments: author: Vignesh Palanikumar
body: Thank you so much Pramodh. In Generic credential I don't see anything as BitBucket but I had one as sso. I deleted that but still facing the same issue. Actually its not about the app password. When I copy the repo url and try cloning it, a pop up comes up and asking for username and password. I don't remember the password.   

Is it the SSO password I use in my organization or a separate password for BitBucket?  


author: Pramodh M
body: It's the SSO Password, but App password should also work when the pop up comes and you enter the credential.


author: Vignesh Palanikumar
body: Wow it is working fine now. Thanks a lot Pramodh. Have a good one !


author: marseilleLogi
body: Worked for me. Thank you


author: Peter Paker
body: It also worked for me[.](https://howtowp.com/) Thanks for the suggestion.

comments: author: keshav.fore
body: It is not working for me can you pleas help me

Error: fatal: credential-cache unavailable; no unix socket support  
fatal: credential-cache unavailable; no unix socket support  
remote: Invalid username or password


Tags: atl-gruland

bitbucket-cloud

cloud
How can i enable repo's 300+
Asked by anoel_reactif:

my team and I reached the limit of 300 repo  
what I need to do to enable more repos? Thanks!

Andre Noel  
Front-end developper  
Reactif Web - reactif.ca


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

Just to give you some context around this behavior, this limit is set to prevent abuse, requiring us to validate if it's an actual person with a real need for that. I went ahead and exempted your workspace, so you should be able to create more than 300 repositories now.

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: anoel_reactif
body: Thanks you Caroline !!

Have a good day :)


author: Caroline R
body: Hi, Andr?!

You're welcome! Have a good day too!

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

repo-limit
Update plan premium
Asked by Abril Mendez:

Hello! Bitbucket recently announced the following to me:

Repository size exceeds limit {#toc-hId--1185430170}
----------------------------------------------------

This repository is over the 4 GB limit and you are not able to push new commits. To resolve this, contact your repository's admin.  
For this reason I upgraded to the Premium Plan to get 10GB but I haven't found how to upgrade this plan or how it works for large files.

I read several atlassian articles on this subject but I find the "how does that 10 GB work".

Could someone help me to see how to proceed?


Answers:
author: Pramodh M
body: Hi [@Abril Mendez](/t5/user/viewprofilepage/user-id/4702212)

Welcome to the Community!!

Can you navigate to your workspace settings to see if your repo is listed here?

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

If it is present, you should be able to track LFS Size

Additional Costing details here

<https://support.atlassian.com/bitbucket-cloud/docs/storage-policy-for-git-lfs-with-bitbucket/>

Thanks

comments: author: Abril Mendez
body: Hello [@Pramodh M](/t5/user/viewprofilepage/user-id/3691224)

Thank you ? With this information, the 10GB make sense to me!

Thank you so much! ?


author: Pramodh M
body: Can you please mark the question as answered
git-ftp in pipeline returns There are no files to sync.
Asked by ascweb:

My pipeline runs a build and creates a new **dist** folder then in the next step I try to upload it by git FTP but... it says "There are no files to sync."

My configurations are:

.gitignore has \`/dist\`

.git-ftp-include has \`!.dist/\`

**The pipeline**:

```
- step:
    script:
      - npm i -g npm@latest
      - npm install
      - echo "npm run lint"
      - echo "Build"
      - CI=false npm run build
      - echo "$(ls -la dist/)"
      - cd dist/
      - ls
    artifacts:
      - dist/**
- step:
    name: 'FTP'
    image: 'wagnerstephan/bitbucket-git-ftp:latest'
    script:
      - git reset --hard
      - git config git-ftp.url ftp://$FTP_HOST
      - git config git-ftp.user "$FTP_USER"
      - git config git-ftp.password "$FTP_PSW"
      - git ftp push --syncroot ./dist/
```

    The output is

    + git ftp push --syncroot ./dist/

    There are no files to sync.

    Last deployment changed from 680f8... to 1236dc4....

In step 1 the ls returns all files created in dist/ but no files are uploaded.


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

1. Are these two steps perhaps defined as *parallel*? Because parallel steps cannot use artifacts produced by steps in the same parallel set.

2. Do you see the files in the second step if you add the command **ls dist** in that step?

Kind regards,  
Theodora

comments: author: ascweb
body: Thanks for the answer, Theodora.

1. No. They are not defined in parallel

2. Yes I did the **ls** and I see all the files created into the **dist/**

Then the

```
git ftp push --syncroot ./dist/
```

return a message: There are no files to sync.  

If I join the FTP I see a log file with the last commit id but no files and no dist/ folder.

I also tried creating an empty dist/ but...

Thanks for any suggestion!!!

S.


author: Theodora Boudale
body: Hi S,

Thanks for the info. As a next step, I would suggest debugging this locally with Docker to figure out if the issue occurs in Pipelines only or not.

You can do this the following way:

**1.** Take a new clone of the repo on your machine

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

**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 wagnerstephan/bitbucket-git-ftp:latest
```

Replace **/Users/myUserName/code/my-repo** in the command with the path of the clone you took in step 1.

**4.** After the Docker container starts, you can run the commands of the script in your yml file (replace the variable names with their actual values, as these variables won't be available locally) and see if you can push with the same command.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
pick my individual branch in visual studio
Asked by Gopisankar M:

how to pick my individual branch for a visual studio from a lot of branch in bitbucket


Answers:
author: Mikael Sandberg
body: Hi [@Gopisankar M](/t5/user/viewprofilepage/user-id/4730595),

Welcome to Atlassian Community!

You can select your branch if you go to the Team explorer, or your should see the current branch you are on down at the bottom in the right-hand corner, and if you click on it you will see a list of branches that you can switch to.


Tags: bitbucket-cloud

cloud