youngmon/atlassian-qna huggingface dataset:
Upgrade from *very early* 4.14.12 to 7.20
Asked by Jim Henk:

Hi. I'm a new contractor tasked with reporting on what's going to be necessary to do the big Bitbucket upgrade. (starting over isn't an option) Surfing through the 45 versions worth of release notes since the early version, (above) I'm swiftly coming to the conclusion that this is going to be a very big production.

Details: Centos 7 - hosted locally, not cloud (no plans or intentions to migrate to Cloud) - It's Bitbucket Server, not Data Center. Current ElasticSearch appears to be 2.3.1 - can't even \*find\* a server.xml file - as I mentioned above, current BitBucket version is 4.14.12

Can't seem to find upgrade instructions, but it seems that ElasticSearch 2.3 was deprecated in 1/18, and even 5.5 was deprecated in 3/20.

How can I find what the upgrade procedures are going to be? Is it even possible?

Thanks much.

- Jim H.


Answers:
author: Christian Glockner
body: Hi Jim,

You can find the upgrade guide for 7.20 at <https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html> - in principle you can upgrade from any earlier version of Bitbucket Server or Stash to the latest. This *is* a big upgrade though, but the guide should have you covered.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

server
Files/folders go missing when building multi-stage docker image in bitbucket pipelines
Asked by Drakenkor:

I have two dockerfiles that I use to build a docker image that's deployed as a AWS Lambda. and I would like to retain the files from docker image amazon/aws-lambda-python:3.9 in my final built docker image. I build the public docker image and publish it on docker hub.

**When I build this docker image locally everything is as expected.**

**However, when I use Bitbucket pipelines to build my private dockerfile pulling from my public docker image, many of the essential files are missing in the final build step.**

I need the entire /var folder from amazon/aws-lambda-python:3.9 as aws to be in my final docker image. How can I achieve this?

Public docker image:

```

FROM amazon/aws-lambda-python:3.9 as aws

ENV PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin
ENV LAMBDA_RUNTIME_DIR=/var/runtime
ENV LANG=en_US.UTF-8
ENV TZ=:/etc/localtime
ENV LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib
ENV LAMBDA_TASK_ROOT=/var/task
ENV LAMBDA_RUNTIME_DIR=/var/runtime

RUN yum update -y
RUN yum -y install tesseract poppler-utils
RUN python3 -m pip install --upgrade pip 
RUN pip3 install pillow pytesseract requests boto3 python-dotenv pytz gql[all] PyMuPDF google-cloud-storage pdf2image --target "${LAMBDA_TASK_ROOT}"
WORKDIR ${LAMBDA_TASK_ROOT}

?


ENTRYPOINT [ "/lambda-entrypoint.sh" ]

```

Private docker image:

```

FROM private-docker-image:latest

ENV PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin
ENV LAMBDA_RUNTIME_DIR=/var/runtime
ENV LANG=en_US.UTF-8
ENV TZ=:/etc/localtime
ENV LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib
ENV LAMBDA_TASK_ROOT=/var/task
ENV LAMBDA_RUNTIME_DIR=/var/runtime
COPY --from=amazon/aws-lambda-python:3.9 / /
COPY . ${LAMBDA_TASK_ROOT}
WORKDIR ${LAMBDA_TASK_ROOT}
RUN chmod -R +rwx ${LAMBDA_TASK_ROOT}
RUN chmod +x /lambda-entrypoint.sh
CMD [ "app.handler" ]

```


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

Thank you for contacting Atlassian Support, I'm Norbert from Bitbucket Cloud Support, it's nice to meet with you!

Can you give me an example for the folder/file names which are missing in the /var directory? I'm going to try to build the same Dockerfile on my Pipelines, that you did locally and it succeeded.

Also can you let me know whether if you were using Bitbucket Runners or not? Once I have information I'm going to reproduce your steps.

I'm looking forward to hear from you.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: aws

bitbucket-cloud

cloud

docker

lambda

python
Branch Permissions - Prevent creating new release branch without write access
Asked by Curtis:

In Bitbucket Server, restricting access to just change merged via pull request, still allowed users to create a new release branch (or whatever branch type was restricted) but in Bitbucket Cloud, that same restriction, prevents anyone from creating the branch, and they have to get write access to the branch, in order to create the branch. So if adding everyone, if that is what is wanted to create release branches, then there is almost no point to the restriction.

Is this a bug, or by design? And why the difference in function between Server and Cloud? Is there a good reason why Cloud restricts the creation of the branch?


Answers:
author: Theodora Boudale
body: Hi Curtis,

I think that this was by design initially, Bitbucket Server and Bitbucket Cloud are different products and certain features work differently in each product.

We have a request to change this behavior in our issue tracker:

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

I would suggest adding your vote to that ticket (by selecting **Vote for this issue** link). You are more than welcome to leave any feedback, and you can 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.

Another way to work around this at the moment would be by creating a branch permission with *Write access:None* for each release branch after creation, instead of using the *release/\** pattern.

Kind regards,  
Theodora

comments: author: Curtis
body: While not the answer I was hoping for, and for our group, that workaround would not be feasible, it is the answer.

Thanks.


Tags: bitbucket-cloud

branch

cloud

permission
Why are my credentials invalid if SourceTree says "Authentication OK"?
Asked by djwendel:

I just changed my password on id.atlassian.com and I also created and app password for git (for use on my remote servers). That part works fine. Now I'm trying to get SourceTree to work again on my local computer. My account was originally set up to use OAuth. I click "refresh OAuth token" and it says "Authentication OK" with a little green checkbox. But when I try to pull any of my repos, it says my credentials are invalid. I've also tried to switching to Basic authentication and using the app password I just created for git access, and I get the same "Authentication OK" status in the settings, but when I try to pull I get the same "invalid credentials" error. Can anyone help me out with this?


Answers:
author: djwendel
body: Answered my own question in case anyone else runs into this when abandoning the old login system on the last possible day like me. I had my remote paths set to \[username\]@bitbucket... when I was using the old-style account password authentication. I had to remove my username from the URL and then everything worked fine with my OAuth authentication, using my BitBucket account as the Remote Account in the repo settings.


Tags: bitbucket-cloud

cloud

sourcetree
Does anyone know why all my Git branches disappeared on Visual Studio Community 2019?
Asked by Shehan Senanayaka:

I have been working on a project for a few weeks now. I was able to successfully clone a Git repository and create other branches and work on them. A few days ago, all my branches stopped showing. When I open the project, it says opening repository and it shows the correct one. When I look at Git \> Local Repositories it shows this one as well. However, when I try to look at the branches, it shows nothing for both the Remotes and Locals. The New Branch button is disabled as well. I right clicked the VS solution and clicked on Open in Terminal and then did git branch -a. This showed all my branches. I just don't know why the application says No Branches in Git Changes. The Fetch, Pull and Push buttons are disabled too.


Answers:
author: Peter Anania
body: This is just a shot in the dark, but sometimes VS forgets that it is using the Git Flow workflow and asks you to connect to the repository, as it used to in TFS. If you go to the Team Explorer tab (Team Explorer Home) and click the Git Changes button that sets back.

Hope that helps, Peter


Tags: feedback-forum
Does a "bitbucket" app password expire?
Asked by Gabriel Ferrarese:

I'm new to using with "App Password", so I have a question about whether it has an expiration date.  

Thank you.


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Gabriel Ferrarese](/t5/user/viewprofilepage/user-id/46174) ,

based on the following guide <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/> App Password doesn't expire but it could be revoked.

Because App passwords, usually, are used in irder to integrate other tools,it doesn't require two step verification and it doesn't expire.

Hope this helps,

Fabio

comments: author: Gabriel Ferrarese
body: Yes it helps. Thanks [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528)


author: Fabio Racobaldo _Herzum_
body: You're welcome [@Gabriel Ferrarese](/t5/user/viewprofilepage/user-id/46174) . Please mark my answer as accepted so this thread could be considered closed.


Tags: bitbucket-cloud

cloud

expiry

password
Lines in file have been truncated due to their length and can?t be edited
Asked by Narendra:

Lines in file have been truncated due to their length and can't be edited In bitbucket


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

Could you please give us more details about the issue you are facing? Where are you observing the issue: Bitbucket UI or your local repo? Please feel free to share a screenshot if you can (removing any private information).

Looking forward to hearing from you.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Default .gitignore
Asked by Ronny Brandt:

When creating a new repository we usually say yes to the "create .gitignore" section since it gives us a good starting point. But we want to include more files in the default gitignore, that come up often (like .env files). Is there a way to do that or are we stuck with the default?


Answers:
author: Steve Thornhill
body: Not a feature as of yet.

There is a request for it that you could vote on - <https://jira.atlassian.com/browse/BCLOUD-14061>


Tags: bitbucket-cloud

cloud
S3 deployment failing in pipelines
Asked by Sri Puligadda:

I'm trying to run the pipeline using pipe: atlassian/aws-s3-deploy:1.1.0 to deploy to S3.

It was pushing all the files as expected, but the end its giving deployment failed error.

Please can someone throw some light on the issue.

Below is the screenshot of the debug log![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/185714iCFA06EAD146E0980/image-size/large?v=v2&px=999 "image.png")

This the was the step in use  
- step:

name: Deploy to S3

deployment: uat

script:

- pipe: atlassian/aws-s3-deploy:1.1.0

variables:

LOCAL_PATH: 'dist/'

AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

ACL: 'bucket-owner-full-control'

AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION

S3_BUCKET: $S3_BUCKET

DELETE_FLAG: 'true'

DEBUG: 'true'


Answers:
author: Devendra Saroj
body: I encountered the same error, and it wasn't the issue of file name in my case. Tried multiple things, at the end removing \`DELETE_FLAG: 'true'\` from variables worked.


author: Ankit Gupta
body: Hey Sri,

If it's transferring the files then authentication is working and so is uploading to the bucket. Do you see any other error message except "Deployment failed" as that's quite generic?

comments: author: Sri Puligadda
body: Hi Ankit,

Thanks for the reply.

As you can see in the screenshot, there was some debug info if it can be any help

2022-03-02 11:24:55,741 - Thread-1 - awscli.customizations.s3.results - DEBUG - Shutdown request received in result processing thread, shutting down result thread.  
status=1  
set -e  
[[ 1 -eq 0 ]]  
fail 'Deployment failed.


author: Ankit Gupta
body: Hi Sri,

This seems like the sync failed with those credentials. You can locally try running the command for sync from here: [https://bitbucket.org/atlassian/aws-s3-deploy/src/master/pipe/pipe.sh](https://bitbucket.org/atlassian/aws-s3-deploy/src/cb691042b9feff189fdb850e2e79f59c1fa40daf/pipe/pipe.sh#lines-114)

It would be able to tell you why the deployment failed.


author: Sri Puligadda
body: Issue was resolved.

Basically there was a file with name which has a non-utf8 character and it was causing the issue.

Thank you


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Redirect redis server from localhost to http://service-name:port
Asked by nacbapat:

Is it possible to redirect a service name from localhost to <http://service-name>: port  

```
image: python:3.8

pipelines:
default:
- parallel:
- step:
name: Test
services: 
- redis-server
caches:
- pip
script:
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- pip install pytest
- cd files
- python3 -m pytest -v tests/test_app.py
definitions:
services:
redis-server:
image: redis:3.2

```

app.py

```
?
```

```
from distutils.log import debug

from itertools import count

from flask import Flask,render_template

from flask_redis import FlaskRedis

count = 0

app = Flask(__name__)

app.config['REDIS_URL'] = "redis://redis-server:6379/0"

#app.config['REDIS_DB'] = 0

redisclient = FlaskRedis(app)

@app.route("/")

def helloworld():

# exit(1) #1 means with error 0 is with error

global count

count = count +1

redisclient.set("value1",count) 

return "HelloWorld: {0}".format(redisclient.get("value1").decode("utf-8"))

@app.route("/hello")

def hello():

return render_template("index.html", placeholder = "hello demo for Panos")

if __name__ == "__main__":

app.run(debug=True,host="0.0.0.0",port=5000)
```

app_test.py

```
import unittest

import app

def test_main():

assert "HelloWorld:" in app.helloworld() 
```

how do i redirect from localhost to redis-server ?


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

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

Based on my observation, you would like to connect from your app to the redis service, which is running in Bitbucket Pipelines. As our documentation states, no port mapping or hostnames are required: <https://confluence.atlassian.com/bitbucket/use-services-and-databases-in-bitbucket-pipelines-874786688.html>

To connect, can I ask you to try to connect as:

```
"redis://localhost:6379/0"
```

Please let us know how it goes.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

cloud
p4merge does not open files for diff
Asked by Jeffrey Love:

I've set up P4Merge in the preferences and, when I right-click a file in the staged window, Resolve Conflicts \| Launch external Diff Tool opens P4Merge. However, all I get is a dialog that shows 'Details of files being merged' showing the two files, followed by a note that I'll have to QUIT my merge tool to complete the merge process, and an Abort button - nothing else.

I've seen comments about things being slow but I've not seen anyone say it just never starts up.


Answers:
author: Seth
body: Have you independently installed P4Merge? The diff programs in the SourceTree options are NOT distributed with SourceTree.


author: Seth
body: SourceTree always shows the dialog you described when launching an external merge tool. P4Merge should open as a separate program. Is P4Merge not launching?
SourceTreeApp git cpu overuse
Asked by Andreas Larsen:

Opening sourcetree and staging some files sends the git cpu usage through the roof for a couple of minutes. Seems like a bug.

Screen Shot 2015-06-30 at 12.39.02.png


Answers:
author: Andreas Larsen
body: Have had this happening to me multiple times en the last week or two but can't reproduce it right now. I'm fairly certain all previous spikes happened when staging and/or committing file changes to remote repo. Will report back if/when it happens again.


author: Bal?zs Szakm?ry
body: Please create a bug report about this at <http://jira.atlassian.com> (add as much detail as possible to reproduce the issue) and post the link here in a comment.


author: minnsey
body: Hi Are you able to tie the spike to a particular action in SourceTree?
Ignore submodules
Asked by Jon Stoneman:

I'm working with a github repository that has a submodule and I don't have permissions to access the submodule repository. Whenever I push/pull/etc Sourctree does "git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive" which gives an error. Is there a way of stopping it doing this?


Answers:
author: Bal?zs Szakm?ry
body: SourceTree tries to be smart about the submodules in the background and there are no settings where you could change this. If it bothers you a lot, switch to another client, or find/create a feature request for this at <http://jira.atlassian.com>. (Post the link here in a comment for others if you do.)


author: Jon Stoneman
body: Link to feature request as suggested by Balazs: <https://jira.atlassian.com/browse/SRCTREEWIN-3339>
View whole stash in SourceTree
Asked by David Rickey:

When viewing the changes in a stash in SourceTree, some of the files changed don't show all changes. How can I view (within SourceTree) all of the changes?


Answers:
author: Brian L Walker
body: This is still an issue. I thought I was going crazy. If you go to the CLI and show the stash, it is complete, but Sourcetree does not provide a way to view all of it (Windows 8, ST: 3.1.3, Git: 2.22.0). This is a significant drawback IMHO.

comments: author: michael_camilo
body: It's been years and no one fixes it ???


author: David Rickey
body: It's only showing the first hundred lines of files that have been deleted or added. I found editing the "Max Diff Line Count" (I put it arbitrarily large to 10,000 instead of stupidly small default of 100) option in Tools -\> Options -\> Diff fixed it. But it still doesn't show the full contents of added/deleted files.

stash.jpg  
[](https://community.atlassian.com/t5/Sourcetree-questions/View-whole-stash-in-SourceTree/qaq-p/166728?attachment-id=11737){#link_116a32dfc2e7d4}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4877/1/stash.jpg){#display_116a32dfc2e7d4_0}


author: Shylendra Kumar
body: by increasing the `Max File Count` and `Max Diff Line Count` in the `Tools > Options > Diff.`

It is worked for me. Source: <https://stackoverflow.com/a/49233401/2462531>


author: sreekumar_menon
body: I believe this is a limitation in windows version, you have the option to open it in an external tool from within sourcetree.

comments: author: George Hughen
body: No, you cannot diff the files in a STASH in an external tool. This problem still exists today. Any file with more than 100 lines that you added to a stash cannot be viewed in the stash. You have to apply the stash to its original branch in order to recover it. This makes stashes difficult to use when trying to manually merge changes from one branch to another.


author: George Hughen
body: The SourceTree UI for this task is not helpful. To get the full source out of a stash, you can run a 'git stash show -p stash@{0}' command in a git bash shell. You can redirect the output into a text file and grab your complete stash source.

I found my answer here: <https://stackoverflow.com/questions/37208438/see-full-content-of-stash-in-sourcetree>


author: sreekumar_menon
body: can you attach a screenshot to understand your question better?


author: HarryH
body: Try to remove the index on the file, then add the index again.
Why I am receiving "R6016 not enough space for thread data" message in Windows 7?
Asked by AlissonBertho:

Why I am receiving this error message in Windows 7 when I use SourceTree:

"Runtime Error!

Program: c:\\Program Files (x86)\\git\\bin\\git.exe

R6016 - not enough space for thread data" ?


Answers:
author: AlissonBertho
body: If your Windows is 64-bit version, the problem is the version of your Git. You need a 64-bit Git version but at this moment, the only you can find is an alternative Git for Windows. Remove all Git components in your computer and install Git For Windows 64-bit.  
Download it here: <https://github.com/git-for-windows/git/releases>


author: leojustino
body: problem solved after installed external git x64.


author: leojustino
body: i am using the embeded git from source tree.

is there a way to update that git?

thanks for the reply


author: leojustino
body: i am having the same problem after upgrading to version 1.16.16.

what can i do to solve this issue?

Sem t?tulo.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/Why-I-am-receiving-quot-R6016-not-enough-space-for-thread-data/qaq-p/39648?attachment-id=69){#link_116a330b78bcda}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/1158/1/Sem%20t%C3%ADtulo.png){#display_116a330b78bcda_0}


author: William Zanchet [Atlassian]
body: Hello Alisson,  

This problem seems to be related to your Windows 7 rather than SourceTree.

I could find the following thread that might be able to help you:  
<http://www.techsupportforum.com/forums/f217/r6016-not-enough-space-for-thread-data-733249.html>  

Cheers,  
WZ


author: Nic Brough -Adaptavist-
body: I've run into this error on other applications, it's mostly shoddy code in Windows that programs have to work around. There are three solutions

1. If you're on a 32 bit version of git, move to the 64 bit one
2. The workaround that programs usually have to implement is not present in git for windows after 1.9.2, so if you downgrade to that, it should go away. (Obviously, this may not be possible)
3. Use any other operating system! (Ok, a bit facetious, probably not going to happen, but I have to mention it)
Pre-commit not running
Asked by znarkus:

Hi! SourceTree doesn't run my pre-commit hook.

This command is run:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree commit -q -F /var/folders/nh/1nd2c3gd1xg4t3j6p0dgg40w0000gn/T/SourceTreeTemp.nhB6DQ -a

In SourceTree it only says "Completed successfully", but running that from the Terminal triggers the pre-commit. On OS X and using <https://github.com/observing/pre-commit> to create to pre-commit hook.


Answers:
author: jonathanconway
body: I'm having a similar issue.

The only way I've found to get the hooks working is to open SourceTree from the console, using a command such as the following:

```
open /Applications/SourceTree/Content/MacOS/SourceTree
```
Are there file size limitations within SourceTree?
Asked by R Thomas:

I have a 6MB file in a repository. The content of the file is not showing within SourceTree. Also noticed that when trying to see differences between version, content of file is not showing. Smaller files (5kb), content shows within SourceTree. Why?


Answers:
author: sreekumar_menon
body: for larger files, you need to change the max file size under preferences-\>diff-\>size limit . I set mine to 6000 k

comments: author: R Thomas
body: Awesome! This is what I actually ran across yesterday and it worked perfectly! Thanks for taking the time to reply!


author: Seth
body: I believe it is because SourceTree has exhibited serious performance issues trying to diff huge files.

comments: author: R Thomas
body: Thanks for your reply!