youngmon/atlassian-qna huggingface dataset:
remote: Your credentials lack one or more required privilege scopes.
Asked by malgorzatatalaga32:

Hi,

i have a problem with pushing my file to the Bitbucket repository. Here are the logs form my console (i use macOS):

gosia@MacBook-Pro-Malwina repo % git status

On branch master

Your branch is ahead of 'origin/master' by 1 commit.

(use "git push" to publish your local commits)

nothing to commit, working tree clean

gosia@MacBook-Pro-Malwina repo % git push origin master

remote: Your credentials lack one or more required privilege scopes.

fatal: unable to access '<https://bitbucket.org/malgorzatasworkspace/bitbucketstationsupplies.git/>': The requested URL returned error: 403

i added an ssh public key to my bitbucket account (the label is the same as the file name) and the ssh authentication seems to be working:

gosia@MacBook-Pro-Malwina \~ % ssh -T git@bitbucket.org

authenticated via ssh key.

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

I looked up some relevant problems on stackoverflow but nothing has solved the problem so far


Answers:
author: Syahrul
body: G'day, [@malgorzatatalaga32](/t5/user/viewprofilepage/user-id/5229772) Welcome to the community!

Based on the error message you encountered, it appears that you are currently using HTTPS instead of SSH. The error suggests that your password or token does not have sufficient privileges to perform the push operation.

To address this issue, you have two options:

Option 1: Updating HTTPS credentials

1. Access your keychain and search for "bitbucket".
2. Locate the entry related to Bitbucket and update the stored password.
3. Generate a new [App Password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) with the appropriate read/write permissions.
4. Update the App Password in your keychain or remove the existing entry.
5. Re-authenticate using the new App Password.

Option 2: Switching to SSH

1. Check our guide [here](https://support.atlassian.com/bitbucket-cloud/docs/change-the-remote-url-to-your-repository/) on how to update HTTPS to SSH connection
2. Once updated, do a git pull to check the connection

I hope this helps.

Cheers,  
Syahrul


Tags: atl-gruland

bitbucket-cloud

cloud
Bitbucket MailServer 500 and can't parse argument number: 0
Asked by ???:

I installed bitbucket on my own server, but this is the first time I use it, I want to configure an SMTP mail sending service, but after I finish the configuration he reports an error saying **can't parse argument number: 0**

#### **Help Me!** {#toc-hId-235891164}

#### **Thanks!** {#toc-hId--1571563299}

![????_20230527223055.png](/t5/image/serverpage/image-id/259889iC19DD044257FA8EE/image-size/large?v=v2&px=999 "????_20230527223055.png")![????_20230527223142.png](/t5/image/serverpage/image-id/259890iD41CBFB3B2C554F0/image-size/large?v=v2&px=999 "????_20230527223142.png")


Answers:
author: Baskar Annamalai
body: Hi there,

I'm assuming you are clicking on the "Test" while the email ID is empty. Could you confirm if the SMTP configuration has been saved as well and only then run the testing?

I also would recommend posting the screenshot in English to ensure non-native language users are able to assist you better.

Best regards,  
Baskar Annamalai  
ServiceRocket.


Tags: bitbucket-server

server
404 page on activate pipelines
Asked by bergpb:

Hey folks, recently I moved 2 repositories to another workspace.

After the move process was completed, I received a message to activate pipelines again:

![repo_error_0.png](/t5/image/serverpage/image-id/259887i6B3CDB723CEA325D/image-size/large?v=v2&px=999 "repo_error_0.png")

But, when I click in Go to settings link, the page shows a 404 error:

![repo_error_1.png](/t5/image/serverpage/image-id/259888iDC8DC90D0DDA6226/image-size/large?v=v2&px=999 "repo_error_1.png")

Also I tried to check if the Pipeline option is showed in my repo configurations but the option don?t exists.

Any tips on how I can reactivate pipelines again for my repository?


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

I think you may be coming across this bug: <https://jira.atlassian.com/browse/BCLOUD-21974>

Are you able to access the following link, after you replace

* **workspace-id** with the id of the workspace the repo belongs to now
* **repo** with the slug for your repository

<https://bitbucket.org/workspace-id/repo/admin/pipelines/settings>

Is there another admin on that workspace that can access this link?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to send all commit notification and details into microsoft teams.
Asked by sourav karmakar:

Hi all

I have 2-3 different requirements for my project.

1. How to get all commit notification in either teams or in email(outlook) (notification should contain commit it, jira id, user, repository, branch, timestamp and chnaged files)

2. Is there any way in bitbucket cloud to restrict multiple commits against any jira ID.(i want one jira one commit)

I am using bitbucket cloud, I have jira and office 365 subscription also,
> I have tried repository level post webhook which is not working and not giving me any notification in my teams (used
>
> Microsoft Teams Bitbucket Connector and repo webhooks and teams connector) {#toc-hId--465175272}
> ------------------------------------------------------------------------------------------------
>
Please suggest me all teh possible ways(any product in marketplace, python code, trigger, any


Answers:
author: Aron Gombas _Midori_
body: Hi [@sourav karmakar](/t5/user/viewprofilepage/user-id/4907176)

Answers:

1. You should be able to do this easily with a Jira Cloud automation rule:
   1. Use the [Commit created trigger](https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Commit-created)
   2. Use the [Send Microsoft Teams message action](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Send-Microsoft-Teams-message)
   3. (There is a Send email action, too!)
2. It is not possible, unfortunately.


Tags: atlassian-teams

bitbucket-cloud

cloud

python
Has anyone integrated testing with Autify?
Asked by Dan Pendergrass:

Can one of you help me figure out how to configure my bitbucket pipeline to use Autify test scenarios?

I have read Autify's documentation for Github, Azure, and AWS, but I haven't been able to configure Bitbucket appropriately.

* <https://help.autify.com/docs/gitlab-cicd-integration>
* <https://help.autify.com/docs/azure-pipelines-integration>
* <https://help.autify.com/docs/aws-codebuild-integration>


Answers:
author: Patrik S
body: Hello [@Dan Pendergrass](/t5/user/viewprofilepage/user-id/4528553) and welcome to Atlassian Community!

I haven't really used Autify in the past, but based on the documentation and examples you shared, I think you will just need to add a command in your bitbucket pipelines build to install Autify's CLI, so you can execute Autify commands.

Following is an example bitbucket pipelines YML file :  

```
pipelines:
  default:
    - step:
        name: Download and run autify
        script:
          - curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/install-standalone.sh | sh
          - autify web test run https://app.autify.com/projects/00/scenarios/000 --wait
```

In the above example we are first installing the autify CLI into the build container, and then triggering an autify test and waiting for it to finish. You will need to update the autify URL (<https://app.autify.com/projects/00/scenarios/000>) with your own test plan/scenario URL.

Also, you will need to [create a personal access token](https://help.autify.com/docs/integrate-with-api#issue-a-personal-access-token) on Autify side, and save this access token in a Repository variable (**Repository settings** \>**Pipelines** \>**Repository variables** ) in Bitbucket pipeline with the name **AUTIFY_WEB_ACCESS_TOKEN**. This is the variable autify CLI will look for to get the credentials to authenticate the request.

Hope that helps! Let me know in case you have any questions.

Thank you, [@Dan Pendergrass](/t5/user/viewprofilepage/user-id/4528553) !

Patrik S


Tags: autify

bitbucket-cloud

cloud
Pipeline to create a request and merge the request?
Asked by Karthikeya G:

I need to update my staging everyday 2-3 times a day. Currently I am raising a PR and merging it manually, Can I automate this process with bitbucket pipelines?


Answers:
author: Aron Gombas _Midori_
body: It should be doable, yes!

The Bitbucket Cloud REST API supports both operations you need:

1. Creating a pull request: <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-post>
2. Merging a pull request: <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-merge-post>

And you can call these end-point from a pipeline!


Tags: bitbucket-cloud

cloud
Why there is an error in your bitbucket-pipelines.yml at [definitions]. This section should be a map
Asked by Satish Kumar:

definitions:  
- step:  
name: build  
script:  
- \&build-test \|  
apt-get update \&\& apt-get install -y curl jq  
RESPONSE=$(curl -sSLO -w "%{http_code}" --header "Authorization: Bearer ${ACCESS_TOKEN_LOCAL}" "<https://api.bitbucket.org/2.0/repositories/pipeline-tutorial/global-variables/src/master/global-variables.yml>")  
echo ${RESPONSE}  
HTTP_STATUS=${RESPONSE:${#RESPONSE}-3}  
if \[\[ $HTTP_STATUS == 200 \]\]; then echo "Download successful"; else echo "Download failed with HTTP status code: $HTTP_STATUS"; fi  
source \<(cat global-variables.yml \| jq -r 'to_entries\[\] \| "export \\(.key)=\\(.value \| [@SH](/t5/user/viewprofilepage/user-id/221911))"')  
pipelines:  
default:  
- step:  
name: Build and Test  
script:  
- \*build-test  
- step:  
name: Deploy  
script:  
- \*build-test  
- echo $USERNAME  
- echo $EMAIL_SUBJECT


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

I believe the error occurs because you are missing the keyword steps in the definitions section, you can try adding it as follows:

```
definitions:
  steps:
    - step:
```

Make sure that the indentation is also correct. Each level should have at least 1 space indentation from the previous one, except for the levels under - step: (these should have at least 3 spaces)

Kind regards,  
Theodora


author: Erez Maadani
body: Hi [@Satish Kumar](/t5/user/viewprofilepage/user-id/5229100)

Try using the validator: <https://bitbucket-pipelines.atlassian.io/validator>
Is there any way to run a task that takes more than 2 hours?
Asked by oboe_ada:

i have a salesforce deploy that takes around 4 hours , is there any way to fulfill this situation .  
in my case , i cannot minimize the duration from my side .  


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

I'm afraid that this is not possible with Pipelines at the moment, every step has a limit of 2 hours.

We have feature requests in our issue tracker about extending the 2-hour limit:

* For Pipelines builds that run in our own infrastructure <https://jira.atlassian.com/browse/BCLOUD-14603>
* For Pipelines builds that run in a self-hosted runner <https://jira.atlassian.com/browse/BCLOUD-21615>

You can add your vote (by selecting the **Vote for this issue** link) to express your interest and 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.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Is there a Variables in pipeline to tell who trigger deploy button?
Asked by Williandy:

Is there a Variables in pipeline to tell who trigger deploy button? I need this variable to tells who responsible for the deployment.


Answers:
author: Ben
body: Hi Williandy,

There is no variable to track who executed a deployment - however, you can mouseover the avatar icon in the bottom-right corner of the build details window to see who executed the build.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
EOF error after npm run build
Asked by Sriram S:

I am trying to build docker image for multiple services. All are node js services there is no changes in bitbucket file \& docker file except port number and file name.

Some of the services are build success. Some services throw error **EOF**.


Answers:
author: Erez Maadani
body: Hi [@Sriram S](/t5/user/viewprofilepage/user-id/5190483)

The EOF is sometimes a symptom of a memory issue. See here: <https://community.atlassian.com/t5/Bitbucket-questions/Building-React-docker-image-fail-by-unexpected-EOF/qaq-p/947346>

My pipeline builds 3 docker images and it uses service:docker:memory: 7128 and step:size: 2x. I "pay" a little extra but stopped having build image issues.


Tags: bitbucket-cloud

cloud
How do I push commits from local repository to remote repositoty (Bitbucket)?
Asked by Lydia Purves Ware:

Hi, I am new to Sourcetree and bitbucket. Every time I try pushing something to the remote repository in Bitbucket I get the following message saying:

remote: login failed due to incorrect login credentials or method along with the following

remote: If you are unsure of which login details or login method to use, visit:

remote: <https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/>

It will then say "Completed with errors" but nothing has been completed.

I have logged in and out multiple times and checked that I am logged in before I begin the push but I keep getting the same error message.

Any advice on what I'm not doing?


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi Lydia,

Bitbucket uses git as the underlying distributed version control system (DVCS). You have a remote repo in Bitbucket and a local repo on your machine. Your local repo 'talks' to the remote repo via git commands.

When you execute a git command and communication to the remote is required, the local machine needs to authenticate with the remote.

Note that [logging in into Bitbucket in the browser](https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/#Atlassian-account-login-credentials) doesn't authenticate your local git client.

The [page you have linked](https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/) talks about several ways to authenticate your local repo with the remote.

1. Have you been able to clone the remote repo to your local machine? If this worked, authentication works.

2. Sourcetree uses the underlying git client to perform all actions., I recommend to use plain command line git commands in the beginning to get familiar with git. Effectively you only need to learn a handful of commands.

3. Walk through the steps of [creating a personal SSH key](https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/#Personal-SSH-keys) on your machine and upload the public key to your bitbucket.org account, you won't have to deal with authentication problems again.

Hope that clears things up - let me know if you need help

Best, Ulrich

// [Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd) - Tools for efficient teams


Tags: bitbucket-cloud

cloud
Unable to leave abandoned workspace
Asked by MikeyCooper:

Hi,

I'm trying to remove myself from an abandoned workspace I belonged to. I use the management screen to confirm I want to leave and get a success message, but I still see the workspace listed.

It's annoying as my account seems to default to viewing this workspace on login.

I've noticed on some other posts that technical support has refreshed something in the background to rectify the issue. Does anyone know how to complete this action on Bitbucket's free cloud version?

Thanks in advanced :-)


Answers:
author: Theodora Boudale
body: Hi Mikey,

I can see in our system that your Bitbucket Cloud account has access to a few workspaces. I've tried to sync permissions for all workspaces listed for your account, but your user still shows as a member of all of them.

Can you see the workspace you tried to leave on this page?

* <https://bitbucket.org/account/workspaces/>

If so, can you click on the name of the workspace to open it, then look at its workspace id in the URL (the workspace id is what comes after <https://bitbucket.org/>), and let me know the first two or last two letters of this id?

Kind regards,  
Theodora

comments: author: MikeyCooper
body: Hi, The first two letters are "da".


author: Theodora Boudale
body: Hi Mikey,

Thank you for the info. I could see this workspace listed for your user, but I used the wrong option for syncing last week. I tried today syncing a different way, and this workspace is no longer listed in your workspaces. Can you please confirm if it no longer shows here for you?

* <https://bitbucket.org/account/workspaces/>

Kind regards,  
Theodora


author: MikeyCooper
body: Hi Theodora,

The old workspace has now disappeared. Thanks so much for your help!


author: Theodora Boudale
body: That's good to hear, thank you for the update!

Please feel free to reach out if you ever need anything else!


author: derdigitalist
body: Hi,

i have exactly the same issue with my account.

Could you help me with that too?


author: Theodora Boudale
body: Hi [@derdigitalist](/t5/user/viewprofilepage/user-id/5403560)

I synced workspace membership for the workspaces you have access to and one of them no longer shows in your workspace list. Is the issue resolved now?

Kind regards,  
Theodora


author: derdigitalist
body: Now it seems to work. Thank you very much!


author: Theodora Boudale
body: That's good to hear and you are very welcome!


Tags: bitbucket-cloud

cloud
Does not allow me to Push, fatal: ArgumentException encountered.
Asked by Eli Vichman:

Hi, I am trying to push a change from a local to the depository, but when i do so it come with this error and its really frustrating.   

<br />

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream XXXXXXXX-site master:master

fatal: ArgumentException encountered.

An item with the same key has already been added.

fatal: ArgumentException encountered.

An item with the same key has already been added.

remote: Invalid username or password

fatal: Authentication failed for 'https://XXXXXXX@bitbucket.org/XXXXXXX/XXXXXXX-site.git/'

Pushing to https://XXXXX@bitbucket.org/XXXXXXX/XXXXXX-site.git

Completed with errors, see above.  

Please Help

<br />

<br />


Answers:
author: minnsey
body: Hi  

This looks like an old bug in the Git Credential Manager for Windows, GCM, that is bundled with Git for Windows to manage credentials.  

<br />

Please with upgrade the GCM directly or update to Git for Windows 2.20.1 which includes a fixed GCM.  

You can do this either by installing Git 2.20.1 directly and configuring Sourcetree to use it, via the Tools/Options/Git tab, or update to Sourcetree 3.0.17 and update the embedded Git in Tools/Options/Git tab.  

thanks
Entire folder of local branches missing from left hand pane in Sourcetree
Asked by Andy Chute:

I just noticed today that my UI in Sourcetree seems to be broken, but I can't seem to narrow down why.  

I usually name my branches \`andy/branch-name...\` and sourcetree is very good at nicely organizing them into sub-folders. Today though, I noticed that my folder no longer had an expanding arrow, even though all the local branches still exist and work fine when I use the git command line. They are even accessible through the commit log in Sourcetree.  

Sorry for the highly obfuscated screen capture, but what you are seeing is the left pane of source tree. The long list of branches on the right is from the branch selector at the top of the graph display showing all local branches.

![Screen Shot 2019-03-10 at 10.56.48 AM.png](/t5/image/serverpage/image-id/48222i19FE80EBECAE27E1/image-size/large?v=v2&px=999 "Screen Shot 2019-03-10 at 10.56.48 AM.png")

I have tried the instructions to wipe my sourcetree config to the defaults (by removing all the files within the \`Application Support/Sourcetree\` folder. I have also tried removing and re-installing Sourcetree without any luck.

Guess I am back to using the command line!


Answers:
author: Andy Chute
body: Apparently I was able to jig it back into place by creating a new branch within the folder based off an existing branch in the folder.  

This seems to have made the sidebar folder expandable again and have it have the right content in it.

comments: author: Tim Closs
body: I've just had the same thing happen all of my "feature/" branches have disappeared locally, but still working remotely. Restarting Sourcetree doesn't solve it, neither does creating a new branch from the current branch (which is a feature/ branch).

Any ideas?


author: Josh Black
body: Andy Chute's suggestion worked for me.

However, when I then immediately deleted the branch the issue returned like before. Additionally, deleting any other branch also seems to trigger the loss of all branches from view.

The only possible specific cause that I can think of is that I believe that the issue first happened when I deleted the top branch in the whole list, so perhaps there is a zero-index bug.


author: Zack Morris
body: Somewhat related, the branch list disappears when there are more than about 300 local branches. Maybe large subfolders suffer from a similar issue.

A workaround is to filter branch names on something like "-", "_" or " " that appears in the name of relevant branch(es), then *View-\>Filter in* *Sidebar*.

I opened a bug report and included git commands to help with deleting local branches:

<https://community.atlassian.com/t5/Sourcetree-questions/Local-branches-missing-in-Sourcetree-when-I-exceed-about-300/qaq-p/2724243>

Also see my comments at:

<https://stackoverflow.com/questions/48121348/sourcetree-some-local-branches-disappeared>
What kind of script can I run in SourceTree "terminal"? How? Where? ....
Asked by Bruce M:

I want to run a script in Windows SourceTree terminal. What kind of script must it be ... bash? Where do I put the script so it can run in the terminal window? What has to be installed first? I am 100% new to sourcetree, so I am asking for any useful info on getting up and running with scripts, ... except writing the script itself. But if there is an environment variable or a useful snippet of script that I will need regardless of my script's main purpose, I'd appreciate that, too. Thanks.


Answers:
author: minnsey
body: Hi  

Yes Sourcetree uses the Git Bash terminal so you need to write bash scripts. The can be put anywhere on your file system as long as you can access the full path from the Bash Terminal. Alternatively the terminal opens in the current repository folder so you can put repository specific scripts into the repository folder itself.  

<br />
Error Message logging in with source tree
Asked by Rod Mason:

Hi,

I can log in with my credential via a web browser.

But when I login with sourcetree (https, or ssh) I get this

error message

The remote service said: 'The operation couldn't be completed. (SDNetDomain error 7.)

Any idea what is causing this error?


Answers:
author: bgannin
body: Hi [@Rod Mason](/t5/user/viewprofilepage/user-id/2839619),

I've not seen that particular error before. Can you please log a ticket and include any logs related to it?

If you delete you account and re-add it do you see the same issues still?

Thanks,

Brian Ganninger  
Principal Developer, Sourcetree