youngmon/atlassian-qna huggingface dataset:
Is there a way to view comments?
Asked by James Pragit:

Is there a way to view comments in a BitBucket pull request? It seems that BitBucket automatically hides comments that it thinks are outdated. Is there a way to overcome this behavior?


Answers:
author: Patrik S
body: Hello [@James Pragit](/t5/user/viewprofilepage/user-id/2452305) and thank you for reaching out to Community!

An inline comment in a pull request will be marked as outdated if the section where the comment was originally made in the file has changed. For example, if you add a comment in line 14 of a file asking the developer to fix a typo, and the developer commits and pushed the fix of this typo, the comment on that line will be marked as outdated because the line it was originally added has changed with the fix.

If you would like to still review the outdated comments, you can do so by navigating to the pull request and the file in question, and clicking on the **Outdated comment** button : ![Screenshot 2023-07-25 at 4.01.27 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/271105iAE9D81FD03BDA42A/image-size/large?v=v2&px=999 "Screenshot 2023-07-25 at 4.01.27 PM.png")

That will open a pop-up window with the outdated comment and also the content of the file when the comment was made.

Hope that helps!

Thank you, [@James Pragit](/t5/user/viewprofilepage/user-id/2452305) !

Patrik S

comments: author: James Pragit
body: Thanks. The problem with that rationale is that just because a line was changed doesn't mean that the problem was fixed correctly or at all. An unrelated change could have been made. What's more, it's possible for a line of code to have multiple issues. Just because one issue was fixed doesn't mean that all issues were fixed.

In any case, the **outdated comment** button doesn't always display and inconsistent within the same pull request. I did a code review of pull request last week and made 10 comments. I took 10 screenshots to keep a record of each comment. When I opened up the pull request, there are only 2 **outdated comment** buttons, each showing 1 of my comments which means that 8 of my comments are missing. To make matters even worse, when I open the same pull request in a new window, the **outdated comment** button doesn't display at all which means all 10 of my comments are missing.  

<br />


author: Theodora Boudale
body: Hi James,

I would suggest creating a ticket with the support team to further investigate this. You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.

Please make sure to provide the info you shared here, the URL of the affected PR, and also the screenshots you took from the comments. The support ticket will be visible only to you and Atlassian staff, so any info you share there won't be publicly visible. If we have an open support ticket, the engineer working on it will be able to access the affected PR and investigate further.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
after commit the file My revert is not working
Asked by phsagi:

Hi Team ,

I have committed a file and on the same day with in minutes i have reverted the file , but the changes are not reflecting in source code for the same file and i am able to see my revert was successful.

Let me know if any further information is required from our side.

Thanks

Phani.


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

Could you please first confirm if the issue occurs with Bitbucket Cloud or Bitbucket Server/Data Center? I see your question has the tag 'bitbucket-cloud', but I don't see a Bitbucket Cloud account with your community email. Are you perhaps using Bitbucket Cloud with a different email?

With regards to the issue you reported, how exactly did you revert the changes in this file? Did you execute a Git command and if so which one? Or did you simply edit the file and undo your changes?

Did you commit and push to the remote repo after you made the changes?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Which scope I need to clone a repository's wiki
Asked by Joao:

I have a workspace token ($BITBUCKET_WKP_ATOKEN_REPOSITORY) with all scope for repository (WRITE,READ,ADMIN,DELETE)

The project is private!

The wiki is activated!

I can clone the project but not the wiki

But I'm unable to clone the wiki :

Project:

git clone [https://x-token-auth:$TOKEN@bitbucket.org/\*\*\*\*\*/\*\*\*\*\*\*\*git](https://x-token-auth:$TOKEN@bitbucket.org/*****/*******git)

Cloning into '\*\*\*\*\*'...  
Receiving objects: 100% (346/346), 73.00 KiB \| 247.00 KiB/s, done.  
Resolving deltas: 100% (86/86), done.

But for wiki ins't possible to clone:

git clone [https://x-token-auth:$ATOKEN@bitbucket.org/\*\*\*\*\*/\*\*\*\*\*\*\*git/wiki](https://x-token-auth:$ATOKEN@bitbucket.org/*****/*******git/wiki)

Cloning into '\*\*\*\*\*'...  
remote: Your credentials lack one or more required privilege scopes.  
fatal: unable to access '[https://bitbucket.org/\*\*\*\*\*/\*\*\*\*\*\*\*.git/wiki/](https://bitbucket.org/*****/*******.git/wiki/)': The requested URL returned error: 403


Answers:
author: Ben
body: Hi Joao,

Unfortunately, after my own testing and confirmation with others - it is not possible to clone the wiki using WAT as it lacks the scope required.

We have raised a feature request with our developer team to include this scope, however - please feel free to **"Watch"** this request for future updates and **"Vote"** for it to increase its visibility with regard to customer demand:

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

In the interim, you can make use of an [App Password](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/) instead to perform this as it contains the Wiki scope.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud

permission
Authentication Failed, cant access own bitbucket repo due to "invalid credentials"
Asked by Ottokard:

Hello,  

Im unable to push any commits to my own bitbucket repository. Unsure why.  

I can add remotes, make commits, etc. but not push.  

At first I though it was due to something wrong with my account, so I made a completely new one, only to face the same error.

Im unsure what Im doing wrong.  

Is it something to do with the fact I use Gitkraken for anything involving Git?  


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

Adding remotes and making commits are operations performed locally and they do not require authentication, while a push does.

Are you using HTTPS or SSH to push to the repo? Based on the output, it looks like you may be using HTTPS, but please correct me if I am wrong.

A common issue causing this error is that users often use their account's password and we have deprecated the use of account passwords for Git over HTTPS and API:

* <https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231>

Your account's password can be used only for logging in to <https://bitbucket.org/> from browser. If you want to clone, pull, or push to a repo with HTTPS, you can generate an app password for your account and use that instead of a password (in combination with your Bitbucket username):

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

Are you able to push this way?

If Git or GitKraken specifically are configured to use a credential manager, you may need to delete any stored credentials for bitbucket.org first.

Kind regards,  
Theodora

comments: author: Ottokard
body: Hello,  

I made an app password, and added it to sourcetree.  

Using sourcetree, I tried pushing to my repo.

It didn't work, it just kept loading forever.  

Is there some error happening here?  

Nevermind, closing and opening sourcetree and waiting 10 minutes before clicking push, it worked now.  


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!


Tags: bitbucket-cloud

cloud
REST API for downloading(InputStream) a Repository
Asked by Vipin Kumar:

Hi team,  

Is there a REST API to get the InputStream of a Repository?  

Seems like it was available in 1.0 APIs  
<https://docs.atlassian.com/bitbucket-server/rest/7.14.0/bitbucket-rest.html#idp199>


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

Are you looking to get an archive of a repository hosted in Bitbucket Cloud or Bitbucket Server? Your question has the tag 'bitbucket-cloud', but the API endpoint you posted is of Bitbucket Server.

Bitbucket Cloud has a different API (its documentation is here: <https://developer.atlassian.com/cloud/bitbucket/rest/intro/>).

There is no API endpoint to download an archive of a Bitbucket Cloud repo, but you can use a curl command like the following to get an archive of the source code in e.g. the master branch:

```
curl -u BitbucketUsername:AppPassword https://bitbucket.org/workspace-id/repo/get/master.tar.gz -o master.tar.gz
```

where   
**BitbucketUsername** replace with the username of a Bitbucket Cloud account with access to the repo  
**AppPassword** replace with an app password for this account that has at least Repositories: Read permissions  
**workspace-id** replace with the id of the workspace where the repo belongs  
repo replace with your repo's slug  
**master** replace with the name of the branch you want to get the source code of

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Bit Bucket Side-by-side diff view not working properly
Asked by Ankush Das:

Bit Bucket Diff View is not showing changes between 2 branches in side by side view.

From global diff view settings , side by side diff view is enabled.

Attaching screenshot for reference.

![Bitbucketdiffissue.png](https://community.atlassian.com/t5/image/serverpage/image-id/270404iC8159A3BAD616188/image-size/large?v=v2&px=999 "Bitbucketdiffissue.png")![Globaldiff.png](https://community.atlassian.com/t5/image/serverpage/image-id/270405i536F10DFD0CBFF9D/image-size/large?v=v2&px=999 "Globaldiff.png")


Answers:
author: Theodora Boudale
body: Hi [@Ankush Das](/t5/user/viewprofilepage/user-id/5216676),

The first screenshot you posted shows the diff of a file between commits of the same branch, which indeed does not show a side-by-side diff.

I created a request for applying the global diff view settings on that page of the repo as well:

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

When you compare two branches, you will see a side-by-side diff. Based on the second screenshot you posted, it looks like the reason that you cannot see the diff is because it is too large to display. We have the following limits for viewing diffs in Bitbucket Cloud:

* <https://support.atlassian.com/bitbucket-cloud/docs/limits-for-viewing-content-and-diffs/>

If your diff exceeds these limits, you can view it locally.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to see variables inside ' ' ?
Asked by Carmen Carrero:

Hello,

I'm using bitbucket pipelines and I need to use the value of a variable but inside of ''.

For example, I want the following: **'environment=dev'** and dev is the environmentValue variable.

If I write 'environment=$environmentValue' the result is 'environment=$environmentValue' and not 'environmnet=dev'.

However, if I write echo $environmentValue the result is dev, so I think the error is '' but I need write it with the ''.

Thank you!!


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

Everything you put inside single quotes gets interpreted literally, so variables are not substituted. This is a feature of the shell and not specific to Pipelines, please see here for reference:

* <https://tldp.org/LDP/abs/html/quotingvar.html>

Variables are substituted inside double quotes. If you use

```
echo "'environment=$environmentValue'"
```

you are going to get

```
'environmnet=dev'
```

Is this something that works for you?

Kind regards,  
Theodora

comments: author: Carmen Carrero
body: Yes!!! Thank you :D


author: Theodora Boudale
body: You are very welcome! Please feel free to reach out if you ever need anything else! :)


Tags: bitbucket-cloud

cloud
Bitbucket server doesn't return credentials on the verify request
Asked by OlegB83:

When the Bitbucket server receives a request to verify whether the push was done or not, it doesn't return the credentials (like this is done for the push request). This leads the local git client to auth manually. Is there any reason to not include them in the verification request? Any plans to change this behavior?

For reference, here is what the push and verify response look like:

![Screenshot 2023-07-21 at 13.20.53.png](https://community.atlassian.com/t5/image/serverpage/image-id/270357i61F7967FBC6B928E/image-size/large?v=v2&px=999 "Screenshot 2023-07-21 at 13.20.53.png")


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

Could you please let us know what are the exact requests you are running for verify and push and verify?

I'm not sure which request is giving the output you posted.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Laravel project with bitbucket pipeline
Asked by Testing Matrix:

I am facing issue while setting up enviourment variable with dotenv file  
What i want is to create dotenv file using pipeline and out enviourment variable,  
When i check the file using ftp env file not created over there.


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

Could you please share your bitbucket-pipelines.yml file here (after sanitizing any sensitive data) so we can see what you are doing and better help you?

You mentioned that you want to create a file in Pipelines and then you check the file using ftp. Where exactly are you checking with ftp? Are you deploying this file to a server of yours from the pipeline, after you create it? And if so, how?

Does this pipeline run in our own infrastructure or are you using one of our [runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/)?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
received a warning from Windows Defender when connecting Bitbucket
Asked by FP_??:

If you accessed Bitbucket from a Windows device, Windows Defender was triggered and issued a warning.

Are there any causes for Bitbucket triggering warnings from antivirus software?


Answers:
author: Patrik S
body: Hello [@FP_??](/t5/user/viewprofilepage/user-id/5273599) and welcome to the Community!

At the time I write this message, we haven't received any other report of Bitbucket being flagged by Windows Defender.

Could you please confirm if you are using Bitbucket Server or Bitbucket Cloud (bitbucket.org) ?

Also, could you share a screenshot of the Windows Defender Warning and the URL you are trying to access, so we can investigate further?

Thank you, [@FP_??](/t5/user/viewprofilepage/user-id/5273599) !  
Patrik S

comments: author: FP_??
body: Hello [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) and thank you for answering my question.

\>Could you please confirm if you are using Bitbucket Server or Bitbucket Cloud (bitbucket.org) ?

Maybe \`Bitbucket Cloud\`.

Our Bitbucket URL contains \`bitbucket.org\`.

\>Also, could you share a screenshot of the Windows Defender Warning and the URL you are trying to access

I'm sorry.

I don't have any screenshots, but similar images are found on the Internet.

One of the examples is below.

![??????.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/271757i6CF8805FB138AC48/image-size/large?v=v2&px=999 "??????.jpg")

And URL is "<https://bitbucket.org/kompira/package/downloads/>".

Thank you, [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) .


author: Theodora Boudale
body: Hi [@FP_??](/t5/user/viewprofilepage/user-id/5273599)!

Does Windows Defender have a log/report with more details on why the warning was shown when you tried to access that specific URL?

We haven't found anything malicious in the repository you posted here.

Kind regards,  
Theodora


author: FP_??
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) !

Thank you for replying my question.

\>Does Windows Defender have a log/report with more details on why the warning was shown when you tried to access that specific URL?

I'm sorry, the PC I used at that time is a rental and is already returned.

But as far as I remember, there was no log/report.

So I suspect I might mistyped the bitbucket URL (For some reason, l needed to type the URL manually).

Thank you.


Tags: unknown-hosting-type
Garbage Collection Request
Asked by Clair Christiancy:

Looking to get this ticket picked up by support to run a GC on our free plan


Answers:
author: Syahrul
body: G'day [@Clair Christiancy](/t5/user/viewprofilepage/user-id/4570181)

I have triggered Git GC on the large repository size. The size has been reduced to 3.6 GB.

Please review our documentation [here](https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/#:~:text=We%20recommend%20repositories%20be%20kept,have%20a%204.0%20GB%20limit.) to further reduce the repository size and avoid hitting the 4 GB limit.

Cheers,  
Syahrul

comments: author: Clair Christiancy
body: Thank you!


Tags: atl-rvw

bitbucket-cloud

cloud
how can i list and delete users from a especific 'user directory' in Atlassian Bitbucket v7.21.4
Asked by mario truber:

i had a security problem on my enviroment bitbucket, some users created accounts in internal user directory. I need to list all internal users and delete, but i cant find this function on bitbucket api.

some one can help me?


Answers:
author: mario truber
body: this api version have no 'filter' to parameter 'directoryName' in user call.

i had to proccess all data user manually to find all userkeys with 'directoryName=Bitbucket Internal Directory' because is'nt a valid parameter to bitbucket API

sucks, but works.

comments: author: mario truber
body: [@atlassian](/t5/user/viewprofilepage/user-id/62094) we need a better functions to this (all atlassian products) API. :D


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

the jira server is my origianl 'user directory', all account created in jira its ok, but because a security fail, some clients got create internal accounts and i need to make a massive delete of internal accounts, but i cant find this api result 'directory' of accounts.


Tags: bitbucket-server

server
Should trigger-pipeline work if I set BITBUCKET_ACCESS_TOKEN var in Deployment variables?
Asked by Yevhen Levchenko:

Hi I would like to configure this pipe <https://bitbucket.org/atlassian/trigger-pipeline/src/master/>  

It works fine with BITBUCKET_ACCESS_TOKEN if I set it as repository variable but  
Will it work if I set it as deployment variable for Staging env?  

<br />


Answers:
author: Ben
body: Hi Yevhen,

As long as you set the deployment environment to the staging evironment using the "deployment" tag, yes it will. I've just tested this on my end and it worked with the following code:

```
TriggerTest: 
 - step:
name: "Test trigger pipe"
deployment: staging
script:
 - pipe: atlassian/trigger-pipeline:5.1.3
variables:
BITBUCKET_ACCESS_TOKEN: $testpipe
REPOSITORY: 'test-repo'
```

For context:

* I have two repositories - **testrepository** and **test-repo**
* I'm trying to trigger a pipeline in the **test-repo** repository using the **testrepository** repository
* I have an access token configured on **test-repo** called **"testpipe"**
* I have this token stored as a deployment variable (also called testpipe) in my **"staging"** environment within **testrepository**

Hope this helps :)

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

trigger
How to reset build number for a new minor version
Asked by Motty Cohen:

Hi,

I'm using semantic versioning in the format of \[major\].\[minor\].\[build_number\] when building artifacts using bitbucket pipeline.

When moving from one minor version to another (e.g. from 1.0.xx to 1.1.xx), I would like to reset the build number to start again from 0.

Unfortunately, there is no way to reset build number - any ideas how to achieve my goal with bitbucket pipeline?


Answers:
author: Patrik S
body: Hello [@Motty Cohen](/t5/user/viewprofilepage/user-id/5273207) and welcome to the community!

A workaround I can think of is to create a custom repository variable to track the build number value.

For example, you could create a repo variable (Repository Settings \> Repository Variables) named $MY_BUILD_NUMBER that starts with the value 0.

For each build where you are not changing the minor version, you can use the value from that variable to create your version \[major\].\[minor\].\[$MY_BUILD_NUMBER\], and then from within the same build you can update the value of the repo variable $MY_BUILD_NUMBER to +1 by making a call to the endpoint [Update a variable for a repository](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-variables-variable-uuid-put). Subsequent builds will get the updated value of the MY_BUILD_NUMBER.

```
curl -X PUT -u BBUSERNAME:BB_APPPASSWORD https://api.bitbucket.org/2.0/repositories/WORKSPACE/REPOSITORY/pipelines_config/variables/<VARIABLE UUID>
```

In the case of a build where the minor version changes, you can set the value of MY_BUILD_NUMBER to 0 again using the same API, and apply the same logic described above.

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

Thank you, [@Motty Cohen](/t5/user/viewprofilepage/user-id/5273207) !

Patrik S


Tags: bitbucket-cloud

cloud
Windows10?SourceTree?????????????????????????
Asked by kumakomam_0126:

?????Windows10?SourceTree????????????

?????(PC_A)??????????????????(USER_A)?????????????????

?????(PC_A)?????????????(USER_B)???????????????????

????????(PC_B)????????????(USER_A)???????????????????

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

?SourceTree???

??+?????????????Clone\]?????

?URL?????

????????????URL???????????????????

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

git -c diff.mnemonicprefix=false -c core.quotepath=false --no optional -locks ls -remote http://.....

(PC_A)??USER_A)??????????????????????????????????????????

?????????????2????

?bitbucket??????????????????????SourceTree????

????????????URL???????????????????

????????? git clone http://...??????????????????????PULL?PUSH??????


Answers:
author: Ai Hirama
body: ?????????????????????????

????[?????????????????????????](https://community.atlassian.com/t5/Sourcetree-questions/%E3%81%82%E3%82%8B%E3%83%9E%E3%82%B7%E3%83%B3%E3%81%A7-%E3%81%82%E3%82%8B%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%81%A0%E3%81%91%E3%81%8C%E3%82%AF%E3%83%AD%E3%83%BC%E3%83%B3%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84/qaq-p/1146450)???????????????????????????????????????????????


Tags: language-ja
How can I solve this issue 'fatal: Authentication failed'?
Asked by OEliasCa:

I have problems updating my sourctree file.

fatal: Authentication failed for ................................................................  
fatal: remote error: CAPTCHA required

I followed the steps provided in <https://sourcecode.jnj.com> and the error is still happening.


Answers:
author: Stephen Sifers
body: Hello,

Thanks for sending over the error your getting along with the steps you've taken. We would like you to attempt one more try at the following:

* Close Sourcetree
* Remove your password file from the following directory:
  * Windows: C:\\Users\\USERNAME\\AppData\\Local\\Atlassian\\SourceTree
  * MacOS: \~/Library/Application Support/SourceTree
* Open Sourcetree and attempt authenticating again.

Please let us know the outcome.

Regards,  
Stephen Sifers