youngmon/atlassian-qna huggingface dataset:
How to view the values of secured Repository variables?
Asked by Rishabh Srivastava:

Below is the path of the variable that I'm trying to view:

Repository settings (on left vertical menu) -\> Pipelines (submenu) -\> Repository variables

<br />

Here it contains few secured variables whose values we are trying to fetch, any suggestions/help is appreciated.


Answers:
author: Ben
body: Hey Rishabh,

Unfortunately - you cannot view these values once they have been set - and these are obscured from the build log if you try to echo these. This is by design as secure variables are stored as encrypted values. If you want to edit a secure variable, you can only give it a new value or delete it.

More information regarding this can be found here:  
<https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/>  

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Rishabh Srivastava
body: Thanks Ben! :)


author: ???
body: I tried below and it worked.

- step:

script:

- echo $VAR \>\> var.txt

artifacts:

- var.txt

You can see the value on var.txt file.

I'm curious that secure variables are really secure. It could be exported to a file and this file could be downloaded!

comments: author: Ben
body: Hey ,

I've just tested on my end with a secured variable - the value of the variable is not actually printed, it prints the variable name without the value - do you see the same output?  

```
 - step:

   script:

   - echo $testvar >> var.txt

   - cat var.txt
```


author: ???
body: Oh, you cannot see the value with 'cat', because the bitbucket automatically erase every string, which is same with secured variable.

So you should save it as a artifacts and download it to see the value.


author: Ben
body: Hey ???,

You're right actually, I've just tested this on my end.

I've raised a bug ticket - thank you for that, that's a great find:  
<https://jira.atlassian.com/browse/BCLOUD-22556>

Cheers!

- Ben (Bitbucket Cloud Support)


author: ???
body: Hey Ben,

As I think, this is the answer for your question: <https://community.atlassian.com/t5/Bitbucket-questions/Are-secured-variables-really-secure/qaq-p/2306410#M91721>

I was also wondering why these secured variables are viewable to developers, but these developers have already right to read and write this repository.

If you have other tokens, which has more right that just writing and reading the repo, then you should use deployment variable to save it and make that deployment environment to be restricted for admins only. Then developers can not trigger deployment step, so they couldn't download the artifacts which they generated with the script above.

btw. my name is pronounced Sungsik Nam. I'm pretty sure it was a bit(!) hard to pronounce.


Tags: bitbucket-cloud

cloud
Someone has already added that SSH key to another account
Asked by Chris Kitching:

This slightly daft policy is preventing me from adding my SSH key to my account.

Please can somebody identify which account is making use of the following public key, and clear it out? I would have asked tech support directly, but apparently that's not a thing. :D

It is not clear to me why this policy exists. Public keys are, you know, \*public\*. One must hold the private key in order to do anything interesting with them. Enforcing uniqueness in this fashion seems misguided (and is an obstacle in situations where "just generate a new keypair" is problematic).


Answers:
author: Nic Brough -Adaptavist-
body: [@Ben](/t5/user/viewprofilepage/user-id/4537226) is going to get this sorted for you, so most of what I'd usually say here is not needed.

I wanted to pick up on the theme of "daft". You're absolutely right about a public key being public - they're fine to share. But not give them to different owners. They should have a single owner (account).

The best analogy for this stuff iI have found s a padlock on a box.

Your public/private keys are not keys, but a padlock and its key. Your public key is a lock. You give that to anyone you want - they can then lock up a box with it and send it where-ever, but only you, the owner of the private key, have the key to unlock it.

So, while it's possible for many people to use the key pair, you reduce your security by sharing public keys with many accounts.

More importantly, you massively reduce trust. Someone sending you something locked up with your padlock probably has a very good reason to use it, and they \*really\* would like to know that it is only you, on the intended account, that can open the box they send you.

Enforcing uniqueness by key is something more systems should be doing, it is the right thing to do.

But I would like a feature in Bitbucket to allow admins (rather than just Atlassian) to be able to identify the account that needs to stop sharing keys.

comments: author: Chris Kitching
body: A public key does not enable the creation of cryptographic signatures, only the verification thereof. An encrypted message alone is not proof of identity (that's what signatures are for).

It is simply untrue that a public key enables you to impersonate someone as outlined in your example.


author: Ben
body: Hi Chris,

Welcome to the Bitbucket Cloud community!

I have censored your post as per our policies regarding the protection of user-generated content, given that this is a public forum.

The copied SSH key appears to have been incorrectly formatted so I was unable to search this from my end.

I have opened a support ticket on your behalf - please check your email and we will continue to communicate there :)

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Docker login documentation needs updating
Asked by AZZ:

hello,

re: <https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/#Authenticate-when-pushing-to-a-registry>

the authentication portion is incorrect.

Following this users get:

    + docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD

    WARNING! Using --password via the CLI is insecure. Use --password-stdin.

    Error response from daemon: Get "https://registry-1.docker.io/v2/": unauthorized: incorrect username or password


Answers:
author: AZZ
body: I reported this incorrectly.

Both long and short parameters work.

The issue was due to case sensitivity of docker hub account names....

// Don't ask how many hours it cost me....


Tags: bitbucket-cloud

cloud
Pipeline WinRunner push issue
Asked by Martin Nicolaides:

The setup runs-on self.hosted and windows.

The pipeline performs a build and also an add \| commit \| push.

This had been working properly for months, but over this past weekend the machine that hosts the pipeline was restarted.  
Now, the pipeline build is still successful, but the add \| commit \| push fail with the following message:

```

git commit -m "Committing new build version number."; git push origin $Env:BITBUCKET_BRANCH}
[Develop 2054236] Committing new build version number.
1 file changed, 1 insertion(+), 1 deletion(-)
remote: The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.
fatal: unable to access 'https://bitbucket.org/[repo-owner]/[repo-slug]/': The requested URL returned error: 403
```

I can guess from the https an authenticated user is required. Is this the case?


Answers:
author: Syahrul
body: Hey [@Martin Nicolaides](/t5/user/viewprofilepage/user-id/4430639)

G'day.

I suggest adding the following verbose commands to get a better idea of the issue:  

```
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_CURL_VERBOSE=1 <git command_here>
```

Look for the authentication and if it's using the correct user/username to authenticate.

If not, you may want to check our guide. [Push back to your repository](https://support.atlassian.com/bitbucket-cloud/docs/push-back-to-your-repository/#App-secret) and add the git remote set-url using the correct username and App Password to push back.

```
- git remote set-url origin https://<your username>:${APP_SECRET}@bitbucket.org/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}
- git push origin
```

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Can you consolidate Bitbucket billing with other Atlassian products (Jira/Confluence, Access, etc.)
Asked by Rami Nasr:

My organization is currently subscribed to the following Atlassian products:

* Bitbucket cloud - Standard Plan
* Jira cloud - Standard Plan
* Confluence cloud - Standard Plan
* Access

Currently we get three separate monthly bill invoices: one for Bitbucket, one for Jira/Confluence, and one for Atlassian Access. These correspond to three separate charges to the same company credit card per month.

Is there a way to consolidate billing so that all four products (which I suppose boil down to three SENs) are summed and billed together under one invoice (and one monthly charge to the credit card)?

Thank you.


Answers:
author: Mikael Sandberg
body: Co-terming is only possible if you have an annual subscription, it cannot be done in the monthly one. Please have a look at the [Purchasing and Licensing FAQ](https://www.atlassian.com/licensing/purchase-licensing#can-maintenance-or-subscription-dates-be-cotermed-synchronized) for more information.

comments: author: Rami Nasr
body: Thanks [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579) , I appreciate the quick and helpful response!


Tags: billing

bitbucket-cloud

cloud
Bitbucket DIY backup with PostgreS
Asked by McDaniel,Vanessa:

Hello, we currently use Bitbucket DIY scripts as backup tool. Our DBA's recent questioned why we were backing up our PG database when they already back it up. From what I can gather, Bitbucket's backup strategy couples the files and data backups for a reason.

I was wondering if anyone had experience commenting out just the database backup step(specifically PG here, but it probably doesn't matter for this question.) Currently we use the DIY scripts provided from Atlassian pretty much out of the box. Is it possible to do this? Is it advisable even?


Answers:
author: Ahmet Ozcelik
body: Hi [@McDaniel,Vanessa](/t5/user/viewprofilepage/user-id/5068409) If you'd like to automate your Bitbucket backups, [Rewind](https://rewind.com/products/backups/development/) has a free marketplace app for [Bitbucket Backups.](https://rewind.com/products/backups/confluence/)

[https://marketplace.atlassian.com/apps/1228755/rewind-backups-for-bitbucket?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/1228755/rewind-backups-for-bitbucket?hosting=cloud&tab=overview)

[Rewind](https://rewind.com/products/backups/development/) is SOC 2 (Type 2) and GDPR compliant and trusted by more than 100,000 companies worldwide. Rewind also provides backup and recovery solutions for [Jira](https://marketplace.atlassian.com/apps/1226389/rewind-backups-for-jira-cloud?hosting=cloud&tab=overview), [GitHub](https://github.com/marketplace/backhub), Trello, Quickbooks, Shopify and more. (You may find Rewind's [G2 reviews here)](https://www.g2.com/products/rewind-backups/reviews)

(Disclaimer: I work at Rewind as a PMM)


Tags: bitbucket-server

server
Can I upgrade from Bitbucket 5.16.10 to Bitbucket 7.21.5 (Data Center)
Asked by Naushad Naleer:

We are running on Bitbucket Data Center 5.16.10. Can we do a direct upgrade to 7.21.5?


Answers:
author: Robert Wen_ReleaseTEAM_
body: You should be able to directly upgrade without having to upgrade from Bitbucket 5 to Bitbucket 6.

I'd be careful to see if you need to upgrade the database or Git first. I've linked the Upgrade Guide. <https://confluence.atlassian.com/bitbucketserver0721/bitbucket-server-upgrade-guide-1115666806.html>

Good luck!


Tags: bitbucket-server

server

upgrade
Bitbucket - An account with that name already exists
Asked by Arthur Novikov:

I'm trying to change my bitbucket name to the one I use everywhere, but I'm getting a message that the account already exists. So it's tied to some other mail, but I can't remember which one. How can I find out?

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


Answers:
author: Nic Brough -Adaptavist-
body: Try logging in with that account, you'll be offered "forgot password" options which will email it.

Bear in mind that Cloud no longer supports non-Atlassian accounts any more - see <https://community.atlassian.com/t5/Bitbucket-articles/Deactivation-of-user-accounts-that-lack-an-Atlassian-account/ba-p/2169213>

comments: author: Arthur Novikov
body: I can't login by name. To log in, I need to enter the email address associated with the "booked" login, but I don't remember it. That is the problem. I'm trying to log in through Atlassian and Bitbucket - the same.


author: Nic Brough -Adaptavist-
body: If you've lost the account, there's nothing you can do.


author: Arthur Novikov
body: Perhaps technical support can help me remember the email associated with the account, or release the nickname?


Tags: account

bitbucket-cloud

cloud

user
The overall size of the repository did not decrease even though I deleted the large branch
Asked by Bet?l Karaman:

Hi,

I opened a new branch in my repository and pushed large files to this branch. Then I deleted this branch from using Bitbucket UI. My repo size did not decrease after deleted the branch. It's still 1.3GB. Can you help me how to reduce this size?

This is how the repo size is when I check in my local.

![Screenshot from 2022-11-01 18-30-09.png](/t5/image/serverpage/image-id/223577i089FBED0936E648D/image-size/large?v=v2&px=999 "Screenshot from 2022-11-01 18-30-09.png")


Answers:
author: Syahrul
body: Hey [@Bet?l Karaman](/t5/user/viewprofilepage/user-id/2121760)

G'day.

I have triggered the Git GC on the affected repository, and the size has been reduced to 276 MB afterward.

Can you confirm this and let me know if it's all good?

Cheers,  
Syahrul

comments: author: Bet?l Karaman
body: Hi Syahrul,

I checked everything seems fine. Thank you so much.


Tags: bitbucket-cloud

cloud
Conditionally execute some steps in pipeline
Asked by Raul Guiu:

I am using semantic release in my pipeline.

if semantic release creates a new version:

1. create a new docker image

2. deploy to QA environment

My problem is that I dont know how to stop step 2 from happening. I can avoid the deployment if in the script adding a check, but the step will have been executed and it will look in the deployment section that a new deployment has been perform.

I tried with a "condition", but it is not good, because my rules to deploy can not be defined with a simple changeset.

My only current idea is to use tags to handle the deploys.

Any other suggestions.


Answers:
author: Theodora Boudale
body: Hi Raul and welcome to the community!

I'm afraid that it is not possible to condition the execution of a step on anything other than a changeset at the moment. We have a feature request for what you are asking:

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

Since you'd be interested in that, I would suggest adding a comment and your vote to that feature request to further express your interest. You can also add yourself as a watcher if you'd like to get notified via email on updates.

In the meantime, apart from the ideas you already had, another suggestion I can make is to make this step manual by adding **trigger: manual** to the step. You can then manually trigger the second step if your condition is met. Please keep in mind though that if there is a third step after the second one, then the second one must complete in order for the third one to run.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
i want to clone the all repositories to s3 through api
Asked by Shaik Naina:

i need a api to clone repositories and copy to aws s3 bucket which can maintain the backup.


Answers:
author: Igor Stoyanov
body: [@Shaik Naina](/t5/user/viewprofilepage/user-id/5067908) hi.

Reference to [Bitbucket API repository](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories).

Also if you need to copy repository to s3, we recommend you to use [aws-s3-deploy pipe](https://bitbucket.org/atlassian/aws-s3-deploy/src/master/).

```
script:  - pipe: atlassian/aws-s3-deploy:1.1.0    variables:      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY      AWS_DEFAULT_REGION: 'us-east-1'      S3_BUCKET: 'my-bucket-name'      LOCAL_PATH: 'build'
```

Regards, Igor


author: Aron Gombas _Midori_
body: You don't need an API for cloning a repo. If you have configured SSH, then you can "git clone" any repo any time over SSH from a script. And if you have already cloned one, you "git pull" the updates any time.

Basically, you'd invoke the Git commandline client from a shellscript. It will just work.

Tip: instead of copying these to S3, you could push the repos to a GitHub private repo. The advantage is then the backup is a Git repo with the history. We use this technique with great success.


Tags: bitbucket-cloud

cloud
What is the latest snyk pipe (snyk-scan) version?
Asked by AZZ:

Hello,

who knows the latest snyk pipe (snyk/snyk-scan) version?

The doc has 0.4.6, but my old ( last year) code has - 0.5.6

ref: <https://docs.snyk.io/integrations/ci-cd-integrations/bitbucket-pipelines-integration-overview/snyk-pipe-parameters-and-values-bitbucket-cloud>


Answers:
author: Ben
body: G'day!

Welcome to the Bitbucket Cloud community :)

The latest version of Snyk Scan for Bitbucket Pipelines is 0.5.3, this can be confirmed by accessing the source of the pipe:

<https://bitbucket.org/snyk/snyk-scan/src/develop/>

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud

snyk
Can't login > Can't install Sourcetree
Asked by kristof117:

Hi, I'm trying to install sourcetree, where one of the steps is to log in to your atlassian account. I entered my details but when I press login, the button always stays in a "loading" state and nothing happens.

I checked my details are correct as I could log in to my.atlassian.com

Is this a temporary auth service problem?

thanks


Answers:
author: Ana Retamal
body: Hi Kristof! Are you on Windows? If so, can you upgrade Internet Explorer to the latest version?

After that, if you're still unable to log in, you can try the following:

* Turn off compatibility mode in IE. To do that, open Internet Explorer, go to the *Advanced options* tab and click on *Reset your Internet Explorer Settings*
* Check *Delete personal settings*
* Change your Internet Explorer Security Zone Settings:

1. Open IE, click on the gear
2. Select "Internet Options"
3. Select the "Security" tab
4. Select "Custom Level" for Internet
5. Find "Access data sources across domains" and select "Enable" (make note of what the setting currently is)
6. Try logging into Sourcetree again

After logging in, follow steps 1-5, but ***reset the setting back to the previous option***.

Let us know if this helps!

Cheers,

Ana

comments: author: kristof117
body: thanks, that worked.


author: Ana Retamal
body: Glad to hear that, have a nice day :)

Ana
SourceTree For Windows UI???????
Asked by ????:

2018/01/15?SourceTree??????UI(????????????????????????????????)???????????????????

?????????????????????????????????

????????????

???????????????????????????????????

???????????????????????????????

??

OS : Windows7 Professional 64bit

SourceTree Ver : 2.4.7.0

?? : ??

??????????? : utf-8


Answers:
author: Mike Corsaro
body: Hello! Could you upload a screenshot? Thanks.

?????? ?????????????????????? ????????????


author: ????
body: ??URL???????????????

???????????


author: ????
body: Windows Update (KB4055532)?????????  
???Microsoft??????????????????????

2018 ? 1 ?? .NET ????????????????? (KB4055002) ?????????????????????? WPF ????????? "TypeInitializationException" ??? "FileFormatException" ??? ?????  
<https://support.microsoft.com/ja-jp/help/4074906/typeinitializationexception-or-fileformatexception-error-in-wpf-apps-t>


author: ?? ??
body: ????????????????????

????????


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

??????????????????????????????????

Windows update??????????


Tags: language-ja
password problem
Asked by Tolga Ulker:

so I'm pretty new to this stuff and still learning it. I logged in my bitbucket account by adding it then I am trying to clone one of my project. When i click clone button, it asks me an another password and I enter the same password as my bitbucket account. It doesn't not work, why?


Answers:
author: bgannin
body: What version of Sourcetree are you using?

What platform (OS) are you on?
where does branch name come from for svn dcommit?
Asked by kevin_hardman:

For some reason SourceTree has started giving me the following message when I push to my remote svn repository:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree svn dcommit invalid-branch

checkout invalid-branch: command returned error: 1

Pushing from the command line "git svn dcommit" works no problem. SourceTree is appending "invalid-branch" to the end of the command. Where does this come from and how do I remove it?


Answers:
author: kevin_hardman
body: To all concerned this is fixed in version 2.7.1 (159)


author: minnsey
body: Hi  

Can I check is this Windows v2.4.7.0 and you using Git/Svn?  

Assuming it is and you get this error when trying to do a push, then Sourcetree thinks 'invalid-branch' is a branch name selected from the list of available branches. What do you see in the push dialog?  

comments: author: kevin_hardman
body: macOS Sourcetree Version 2.7 (152) and yes I am using Git/SVN.

There is only one branch "master" listed in the side bar under BRANCHES. When I click Push in the toolbar or select the menu item "Push to repository" shows "Subversion" with the correct URL next to it. The Push? checkbox is checked, the "Local Branch" shows "Current Branch", the "Remote Branch" is empty and the "Track?" checkbox is checked. I am unable to change any field in the "Branches to push" table. Clicking OK produces the messages provided before.


author: minnsey
body: Thanks for the information


author: inkhead
body: The same thing started happening to me when I updated to version 2.7 on macOS. Is there a fix for this? I have been doing my pushes from the command line ever since this broke. Same version, also GIT/SVN, macOS El Capitan 10.11.6 (15G19009).


author: kevin_hardman
body: I have not seen a fix. FWIW I did discover that if I right click on the "master" branch in the side bar there is a "Push to" menu item that shows "Subversion". Selecting "Subversion" shows the the push sheet with the branch "master" filled in and now clicking OK works.


author: inkhead
body: Thanks for the suggestion. I have multiple branches. When I right click on the branch I am trying to push I still get the same error.


author: inkhead
body: Hey! I tried it again and it worked! Not sure what I did differently the first time I tried it but it filled in the correct branch and worked as expected. Thanks for the work around... It'll do until they fix the overall issue...


author: kevin_hardman
body: I have seen the "Push to" -\> "Subversion" contextual menu item fail on a few (rare) occasions. I believe in those cases the remote branch was still blank in the push sheet. If the column is filled in ("master" in my case) it has always worked for me.

JFYI I did open a bug for this problem ([SRCTREE-5301](https://jira.atlassian.com/browse/SRCTREE-5301)) some time back.


author: inkhead
body: Thanks for the info... It was a big help!


Tags: svn