youngmon/atlassian-qna huggingface dataset:
Bitbucket is injecting environment variable into my values.yaml file
Asked by Quintonn Rothmann:

I have a values.yaml file that I use in a helm command in my bitbucket pipeline.

I created a custom pipeline that I run manually.

Below are the beginning parts of my pipeline:  
- step: \&deploy-my-project  
name: Deploy My Project  
image: ubuntu:latest  
services:  
- docker  
caches:  
- node  
- docker  
- apt  
script:  
- cat "account-setup/scripts/argocd/values.yaml"  

At this point, all instances of the word "password" in the file have been replaced with one of my environment variables.  

An example:  
this:  
**abc.password.value: "put something here" #TODO remove**  
Has been replaced with this:  
**abc.$MY_ADMIN_PASSWORD.value: "put something here" #TODO remove**  
Why is this happening?  
How do I fix this?  

I have tried changing the name of the file and that hasn't helped.  

Any help would be much appreciated.  
Thanks


Answers:
author: Ben
body: Hey Quintonn,

The environment variable will be injected if you have a secured variable that contains this value to obscure it from view.

For example, say you have a secured variable called $TEST with a value of "helloworld", if you then reference helloworld in plaintext in your configuration - it will automatically insert $TEST as a placeholder to prevent this value from being exposed.

Please review your $MY_ADMIN_PASSWORD variable - you can test by deleting it or changing the value to something completely different to see if it is still inserted when you enter "**password".**

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Quintonn Rothmann
body: Hi,  

This is indeed the case.  
I did notice this, and I thought my pipeline was failing because it was actually putting the $ value into my files, but it seems it's only for log output.

My problem was unrelated to the passwords and I've figured it out already. Thanks.  

<br />


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

variable
Question about custom pipeline creation
Asked by Mia Paulin:

[@mention](/t5/user/viewprofilepage/user-id/732788) So I'm creating my custom pipeline using pipe integration and environmental variables I created. There's a testing, staging and production, environmental variable thanks to the advice of many people who have helped me thus far-especially today. Thinking flow of control/programming logic- It makes sense to create the environmental variables before you deploy to those environments, aka run the scripts that create the variables before yo deploy thrm there so you will have a place for these deployments to go, am I correct? The same with the build and test scripts: before you run the building of the application and the testing, shouldn't you have a place for it to take place\[a testing/building environment\]?


Answers:
author: Theodora Boudale
body: Hi [@Mia Paulin](/t5/user/viewprofilepage/user-id/5184106),

Every repository with Pipelines enabled has 3 default deployment environments defined (go to **Repository settings** \> **Deployments**). You can use the default ones in your bitbucket-pipelines.yml file or you can also define new ones and use them in your bitbucket-pipelines.yml file.

Below are some links about deployments:

* <https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-monitor-deployments/>
* <https://support.atlassian.com/bitbucket-cloud/docs/bitbucket-deployment-guidelines/>
* <https://support.atlassian.com/bitbucket-cloud/docs/concurrency-control/>

If you want a certain command to use an environment variable, the variable needs to be defined before you use it. Instead of running a script that creates the variables during the build, you could also use a Workspace, Repository, or Deployment variable instead. You can check the following documentation on how to do this (see section **User-defined variables**):

* <https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/>

If you have any questions, please feel free to reach out!

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

lambda

serverless
How do I make my profile/workspace publicly visible?
Asked by Jan Stolarek:

I noticed that my user workspace is not publicly visible, i.e. only logged in users can see it. I checked my profile and workspace settings and they seem to be fine, but apparently I must have missed something. How do I make my default user workspace visible for people who don't have a BitBucket/Atlassian account?

EDIT: I am on the Free Plan and just want to give anonymous users the ability to browse a list of my repositories.


Answers:
author: Theodora Boudale
body: Hi [@Jan Stolarek](/t5/user/viewprofilepage/user-id/1509406)!

If your workspace is not private (check **Workspace settings** \> make sure that **Keep this workspace private** is unchecked), then anonymous users can browse the list of your public repos at

* [https://bitbucket.org/\<workspace-id\>/workspace/repositories](https://bitbucket.org/<workspace-id>/workspace/repositories)

where **\<workspace-id\>** replace with the id of your workspace.

The link [https://bitbucket.org/\<workspace-id\>](https://bitbucket.org/<workspace-id>) redirects to [https://bitbucket.org/\<workspace-id\>/workspace/overview](https://bitbucket.org/<workspace-id>/workspace/overview). The latter is a page that shows the work of a specific user in that workspace and therefore requires authentication.

Kind regards,  
Theodora


author: Marjorie
body: [@Jan Stolarek](/t5/user/viewprofilepage/user-id/1509406) Anonymous Access settings under space settings. [Share a space externally with anonymous access \| Confluence Cloud \| Atlassian Support](https://support.atlassian.com/confluence-cloud/docs/make-a-space-public/)


Tags: cloud
deleted workspace
Asked by Emilio Rivera:

I deleted a workspace almost a year ago. I finally noticed that it had some important stuff on there. how do i re open a workspace


Answers:
author: Marjorie
body: [@Emilio Rivera](/t5/user/viewprofilepage/user-id/5204443) You cannot restore a deleted workspace. ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/253858i1EE4F3A371A7751B/image-size/large?v=v2&px=999 "image.png")

comments: author: Marjorie
body: I do not think you can restore a workspace. You need to archive workspaces in order to restore them.


Tags: bitbucket-cloud

cloud

workspace
Why doesn't my bitbucket profile exist?
Asked by Ismael Quirantes:

I just finished building a repository and i want to show a badge of passing . The issue is that with this link '[https://img.shields.io/bitbucket/pipelines/\<username\>/javaschoolexam/master](https://img.shields.io/bitbucket/pipelines/<username>/javaschoolexam/master)' the build seems to not exist, but it does and is successful. I noticed that the problem is with my profile, i go to bitbucket.org/\<username\> and a 404 error shows but my username is that one! This a screenshot of my user settings.

\<screenshot removed\>


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

Just a heads up, I removed your screenshot and the username from your post to protect your privacy and comply with our privacy policy, as this info is not publicly available.

Repositories in Bitbucket Cloud belong to a certain workspace, not to an account. You can sign up for a Bitbucket account, and then, using this account, you can create one or multiple workspaces, or be invited to other users' workspaces. When you create a repo, this repo is created under a certain workspace and its URL has the format

* <https://bitbucket.org/>\<workspace-id\>/\<repo-slug\>/

I checked the workspaces your account has access to, and I saw this repo (I am sharing the link here since the repo is public):

* <https://bitbucket.org/java-iq/javaschoolexam/>

You can see from the URL, that the repo **javaschoolexam** belongs to the workspace **java-iq** (and your account is an admin of this workspace)

In the link you shared

* <https://img.shields.io/bitbucket/pipelines/>\<username\>/javaschoolexam/master

you need to replace **\<username\>** with the id of the workspace this repo belongs to, which is **java-iq**

* <https://img.shields.io/bitbucket/pipelines/java-iq/javaschoolexam/master>

We don't provide links to users' accounts but links to workspaces (where the repos belong to).

If you have any questions, please feel free to reach out!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

profile
Can't figure out an auth issue for runner autoscaler
Asked by Mike Stanley:

I was following this guide:  
<https://bitbucket.org/bitbucketpipelines/runners-autoscaler/src/master/>

I have things in a state where, when the runner controller pod spins up, it gives me 401 errors:  
*DEBUG: Starting new HTTPS connection (1): api.bitbucket.org:443*   
*DEBUG: <https://api.bitbucket.org:443> "GET /2.0/workspaces/myworkspace HTTP/1.1" 401 380*   
*DEBUG: GET request to [https://api.bitbucket.org/2.0/workspaces/myworkspace](https://api.bitbucket.org/2.0/workspaces/core-bt)*   
*DEBUG: Got 401 Client Error: Unauthorized for url: [https://api.bitbucket.org/2.0/workspaces/myworkspace.](https://api.bitbucket.org/2.0/workspaces/core-bt) Status: 401*   
*? Unauthorized. Check your bitbucket credentials. Status code: 401. Login failed due to incorrect login credentials or method.*   
*For information on authentication methods for Bitbucket Cloud APIs, visit:*   
*<https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication>*   
*If you are unsure of which login details or login method to use, visit:*   
*<https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/>*   

If I exec into the pod, the username and password variables are correct, and I have tried to use them manually via curl to connect to the [https://api.bitbucket.org/2.0/workspaces/myworkspace](https://api.bitbucket.org/2.0/workspaces/core-bt) and that does work successfully.  

However if I purposely use the wrong password via curl, it spits out the same error.   

I'm a little stumped as this case isn't covered by the documentation. Any help would be appreciated.


Answers:
author: Mike Stanley
body: Well... weirdly enough I got it working and I'm not exactly sure why it wasn't to begin with.   
If you're here with the same problem, regenerate the b64 encoding for the app password. That's really the only thing I changed even though I verified it was right.

comments: author: Igor Stoyanov
body: [@Mike Stanley](/t5/user/viewprofilepage/user-id/5204393) hi. Happy to know you solved this issue for yourself.  
There are possible 3 reasons where this could happen:

1. Check correct permissions for the app password
2. Ensure you correctly encode with base64 the app password (linux and mac have different shell commands), copy/paste to k8s manifest without trailed characters
3. Apply secrets manifest to k8s

   ```
   kubectl apply -f config/runners-autoscaler-secret.yaml
   ```

Regards, Igor


author: Mike Stanley
body: I think the encoding was the issue.  

I usually use:  
"echo 'password' \| base64 -w0"

Typically, this works fine for my purposes. But in this case it wouldn't. It really did need to be:  
"echo -n 'password' \| base64"


Tags: bitbucket-cloud

bitbucket-pipelines

bitbucket-runners

cloud
How to see all my commit in all branches?
Asked by Syed Tousif:

I have done commits in multiple branches but not able to see all commits done by me at a single place.   
Suggest me to see all my commit in all branches at one place.


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

It is not possible to search for commits by a certain author on our website, on the **Commits** page of the repo.

It should be possible to see this locally in a clone of the repo by running the command

```
git log --all --author="name"
```

where **name** replace with the name you have set as author name in your \~/.gitconfig file, in order to see the commits with you as an author. Make sure to fetch all references with the command **git fetch --all** prior to executing the **git log** command, to ensure that all remote references exist in your local repo.

We have a feature request for the ability to search commits by author on our website:

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

The request has been closed due to inactivity (no votes or comments for an extended period of time). However, I would suggest adding a comment to it to express your interest, as our product managers continue to monitor even closed requests.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
error when login to bit bucket account
Asked by tonymanu:

i am getting following error when login to bit bucket account.

"You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again."

Thanks,


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

Your Bitbucket Cloud account was inactive, which is the reason for the error you were seeing.

I went ahead and reactivated it, could you please let me know if you are able to log in now?

Kind regards,  
Theodora

comments: author: Gomez Perez_ Erick
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

I?m having the same problem when I try to login into my Bitbucket account. Whenever try to login the below error page only shown.

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

I've already tried with different browsers and I can access to Jira, Confluence, etc. But the problem persists when I try to access to Bit Bucket. I don't know if my account is inactive. (I have created a new question about it 2 weeks ago.

Can you help me with this issue, please

Thanks

Regards,

Erick


author: Theodora Boudale
body: Hi Erick,

Based on your screenshot, it looks like you are trying to log in to a Bitbucket Server or Data Center instance. Atlassian doesn't have access to these instances, since they are hosted on customers' infrastructure. We can only reactivate Cloud accounts that exist on Atlassian infrastructure.

You will need to reach out to the administrator of the Bitbucket Server / Data Center instance you are trying to log into.

Kind regards,  
Theodora


author: Peter Van de Voorde
body: Hi [@tonymanu](/t5/user/viewprofilepage/user-id/5204195) ,  

Welcome to the Atlassian Community.   

It sounds to me like you might have a browser issue that's preventing you from logging in to Bitbucket. Probably one of your browser add-ons is causing this issue.   

I would suggest turning all of your add-ons off for a minute and try again to see if that solves the problem. You can then turn them on 1 by 1 to see which one causes the problem.   

You could also try going into incognito mode or us a different browser and see if that fixes your problem.  

Cheers,

Peter


Tags: bitbucket-cloud

cloud
Need to get old private repository I used to have
Asked by Kumar:

Hi Team,

I am sorry to trouble you. I has some private repos in bitbucket old one. I used to login with email id .

Today I logged in to bitbucket, I don't find it.

Can you help with in recovering old repos please.

Thank you,

Kumar Shorav


Answers:
author: Esther Strom
body: Hi, [@Kumar](/t5/user/viewprofilepage/user-id/5204194) - welcome to the Community!

Unfortunately we can't help recover your repos. This is a user-helping-user site. You'll need to open a support ticket with Atlassian at <https://support.atlassian.com/contact>.

(Also, I'd suggest you remove your email address from this post for security purposes.)

comments: author: Kumar
body: Thanks, done.


Tags: bitbucket-cloud

cloud
Pipeline crashes with token recognition at ...
Asked by Eren Alpaslan:

I have a pipeline to build and distribute an android application. Previously i was getting success with the same bitbucket.yaml configuration but then it returns error to me. When it comes to the '''kaptReleaseKotlin''' task it is giving this error

```````````  
````> Task :app:kaptReleaseKotlin````  
110
line 1:30 token recognition error at: ''??'  
111
line 1:34 token recognition error at: '''  
112
line 1:94 token recognition error at: ''??'  
113
line 1:98 token recognition error at: '''  
114
line 1:57 token recognition error at: ''??'  
115
line 1:61 token recognition error at: '''  
116
line 1:52 token recognition error at: ''??'  
117
line 1:56 token recognition error at: '''  
118
line 1:100 token recognition error at: ''??'  
119
line 1:104 token recognition error at: '''  
```  

First error message is  
> Task :app:kaptReleaseKotlin FAILED  
FAILURE: Build completed with 2 failures.  
1: Task failed with an exception.  
-----------  
* What went wrong:  
Execution failed for task ':app:kaptReleaseKotlin'.  
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction  
> java.lang.reflect.InvocationTargetException (no error message)  

*** ** * ** ***

<br />

And second one is  
2: Task failed with an exception.  
-----------  
* What went wrong:  
Configuration cache problems found in this build.  
1 problem was found storing the configuration cache.  
- Task `:app:collectReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.  
See <https://docs.gradle.org/7.3.3/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution>  

Previously i didn't get these error


Answers:
author: Eren Alpaslan
body: Adding -Dfile.encoding\\=UTF-8 argument to jvmargs in gradle.properties solved my issue  

org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\\="-Xmx1024M" -Dfile.encoding\\=UTF-8


author: Theodora Boudale
body: Hi [@Eren Alpaslan](/t5/user/viewprofilepage/user-id/5204004) and welcome to the community.

There are many possible causes for errors on builds that were previously successful, like changes in your code, changes in the Docker image used as a build container, third-party dependency changes.

You can check the following guide, specifically "**Scenario 1: Builds were successful earlier, but started failing recently**", for steps on how to troubleshoot the issues:

* <https://confluence.atlassian.com/bbkb/troubleshooting-bitbucket-pipelines-1141505226.html>

Kind regards,  
Theodora

comments: author: Eren Alpaslan
body: Thank you Theodora i will check this  


author: Eren Alpaslan
body: Update:   
Second issue which related with configuration cache solved by removing a single line from gradle.properties  
"org.gradle.unsafe.configuration-cache=true"


Tags: android

bitbucket-cloud

bitbucket-pipelines

cloud

kotlin
ssh from bitbucket throws error
Asked by Rashmi:

My bitbucket data center server has throwing error while trying to ssh to bitbucket. Though it was working properly some days back. It throws error key_exhange_identification write: connection reset by peer.

Fatal ERROR: could not read from remote repository

ERROR Please make sure you have correct access rights ERROR and the repository Exists

when i even try to do ssh clone it gives the same error. I am having system admin access.

My ssh gen access keys are also added to the repository setting and in my account setting.

Any suggestions or resolution of this problem will be highly appreciated.

Regards,

Rashmi


Answers:
author: Baskar Annamalai
body: [@Rashmi](/t5/user/viewprofilepage/user-id/4217906) , could you add the '-vvv' verbose to your command and provide the output of the result here?

Best regards,  
Baskar Annamalai  
Servicerocket.

comments: author: Ranjith Stephen (Contractor)
body: Hi Basker,  

Can you please help on this issue?  
[Setting up Springboot server with bitbucket server](https://community.atlassian.com/t5/Bitbucket-questions/Setting-up-Springboot-server-with-bitbucket-server/qaq-p/607043)


Tags: bitbucket-server

server
add external users to a specific repository, but limit the access to all other repos
Asked by Ifat Keren:

I would like to add a few external users to my workspace, to a specific repository, but to limit the option to grant them access to any other repo. Is there an option to do so?


Answers:
author: Patrik S
body: Hello [@Ifat Keren](/t5/user/viewprofilepage/user-id/4947239) ,

Thank you for reaching out to Atlassian Community!

To invite users to a workspace you can either add them to a user group or give the user direct permissions to the repository. Let me share more details about each option below :

* Creating a user group
  * You will have to [create a new user group](https://support.atlassian.com/bitbucket-cloud/docs/organize-groups-for-your-repositories/#Create-a-new-user-group) and select the level of access this group will have to the repositories. Once the group is created, you can open the group and click on the button in the top right corner **Add members** to invite users to this group or **Add Repository**to give this group (and hence its members) access to repositories under your workspace.

<!-- -->

* Invite the users directly to the repositories you want to give them access to.
  * You will invite the users directly to the repository in question. To grant repository direct access you will need to navigate to the repository and select **Repository Settings** \> **Users and group Access** \> **Add member** (top right corner). When inviting the user you will have the option to select the level of access (read,write or admin)

You're also welcome to take a look at [Grant access to a workspace](https://support.atlassian.com/bitbucket-cloud/docs/grant-access-to-a-workspace/) documentation for additional details on user management in Bitbucket Cloud.

Thank you, [@Ifat Keren](/t5/user/viewprofilepage/user-id/4947239) !

Patrik S


Tags: bitbucket-cloud

cloud