youngmon/atlassian-qna huggingface dataset:
How to mount docker.sock?
Asked by Sander Mol:

Hello,

**What I am trying to do.**

I want to create a regression test for the service of [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/ "Telegraf"). This can essentially be done by running \`telegraf --test\`. As we are running this with a docker-compose definition we would like to use this same docker-compose to run the test.

As Telegraf is also collecting docker metrics, we also need to mount the \`docker.sock\`.

```
version: '3.7'
services: 
   telegraf: 
      image: telegraf:1.18.3-alpine 
      restart: unless-stopped 
      environment: 
         - TELEGRAF_HOSTNAME=${TELEGRAF_HOSTNAME:?} 
      volumes: 
         - ./telegraf.conf:/etc/telegraf/telegraf.conf:ro 
         - /var/run/docker.sock:/var/run/docker.sock
```

**The issue**

It seems that Telegraf cannot authenticate against the docker.sock API:
> 2021-08-11T07:40:12Z E! \[inputs.docker\] Error in plugin: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.21/info": dial unix /var/run/docker.sock: connect: permission denied
>
> 2021-08-11T07:40:12Z E! \[inputs.docker\] Error in plugin: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.21/containers/json?filters=%7B%22status%22%3A%5B%22running%22%5D%7D\&limit=0": dial unix /var/run/docker.sock: connect: permission denied

**What I tried**

I do not seem to be able to locate the \`/var/run/docker.sock\` inside of the pipeline using the following step definitions:

```
 - step: 
      name: "Test Telegraf config" 
      services: 
         - docker 
      script: 
         - cd ${BITBUCKET_CLONE_DIR}/telegraf 
         - TELEGRAF_HOSTNAME=$(hostname) docker-compose run telegraf telegraf --test
```

How can I use the docker.sock that is required by the services I try to test?


Answers:
author: Geoffrey van Rixtel
body: +1 also facing this issue, which is kinda blocking me from running E2E tests properly.


Tags: bitbucket-pipelines

docker

telegraf
Will Atlassian software be blocked from use after 2 Feb 2024 or earlier?
Asked by Endomaster JIRA Admin:

Hi,

We have Jira, Confluence, Bitbucket, Requirement Yogi plug-in running on our server.

We are concerned with the move to the cloud and would like to seek confirmation that our server version will not be remotely deactivated or automatically deactivated.


Answers:
author: Christian Glockner
body: Hi Sebastian,

Atlassian products with perpetual licenses (such as for our Server products) will continue to work in perpetuity.

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Endomaster JIRA Admin
body: Hi Christian,

Just to be sure, We have Confluence, Jira, Bitbucket and Requirement Yogi.

They are for different number of users.

Do you mean to say that not renewing the licenses would still allow us to continue to use the products as before?

Thanks

Regards

Sebastian


author: Christian Glockner
body: Hi Sebastian,

Yes, that's correct. Keep in mind though that you can only upgrade to versions of the products that were released before the expiration date of your license. If you upgrade to a version of a product that was not yet released when your license expires you will have to purchase a Data Center license for the product to work again.

Cheers,

Christian

Premier Support Engineer

Atlassian


author: Endomaster JIRA Admin
body: Thanks Christian


Tags: bitbucket-server

confluence

jira

migration-customer-care

requirement-yogi

server
Delete file from remote server when removed from repository
Asked by jamiestraks:

I am just getting started with bitbucket pipelines and ftp-deploy. Is it possible to have a file which has been removed/deleted from the repository also deleted from the remote server when the pipeline is running? I cant have the entire project deleted as there are some folders and files which are saved to certain directories from other scripts.

Here is my current pipeline script.

```
image: atlassian/default-image:2

pipelines:
branches:
main:
- step:
name: Deploy to Production
deployment: production
script:
- pipe: atlassian/ftp-deploy:0.3.6
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: $FTP_HOST
REMOTE_PATH: /public_html/personal
DELETE_FLAG: 'false' # Don't delete existing files
EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore" # Ignore these
```


Answers:
author: Halyna Berezovska
body: [@jamiestraks](/t5/user/viewprofilepage/user-id/2661194) I guess, you may like rsync more, because this utility is much more flexible <https://linux.die.net/man/1/rsync> .

Checkout the pipe : <https://bitbucket.org/atlassian/rsync-deploy/src>

Regards, Galyna


Tags: bitbucket-pipelines

ftp

server
Creating a tag during build does not trigger the tag pipeline
Asked by Meher Gara:

Creating a tag during build does not trigger the tag pipeline

I do use semantic-release in on my master

as per my bitbucket-pipelines.yml I added a tags section for build (which can be triggered when the tag is created manually)

I would like that my semantic-release trigger the second pipeline.

Any ideas ?


Answers:
author: Theodora Boudale
body: Hi [@Meher Gara](/t5/user/viewprofilepage/user-id/1432097),

I assume that you don't have a command to create a tag in the bitbucket-pipelines.yml file, but the tag is created by semantic-release?

I suggest checking two things first:

**1)** After the tag gets created, does the Pipelines build push back to the Bitbucket repo?

When a Pipelines build runs on a certain branch, then a Docker container starts, this specific branch of the Bitbucket repo gets cloned inside the Docker container and then the script of the yaml file runs.

If a tag gets created during the build, it will get created in the clone of the repo inside the Docker container, and not in the Bitbucket repo.

I am not familiar with semantic-release and I'm not sure if it can be configured to push tags to the Bitbucket repo.

However, you can add the following command in your bitbucket-pipelines.yml file, in the script of the step where the tag gets created (after the command that creates the tag), and the tag will get pushed to the Bitbucket repo:

```
git push origin --tags
```

**2)** Assuming that the tag gets created by semantic-release, do the tag names follow a certain pattern?

And does that pattern match the pattern you specified in the *tags* definition in the bitbucket-pipelines.yml file?

Kind regards,  
Theodora

comments: author: Meher Gara
body: Indeed the tag is created but it's not pushed.

Thanks for the support !


author: Theodora Boudale
body: You are very welcome, I'm glad to have helped!

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

Kind regards,  
Theodora


Tags: bitbucket-pipelines

cloud

trigger
Why didn't I receive verification email?
Asked by cntt-antbot:

Hi!

I'm trying to set up a new account in Bitbucket for my team, but I didn't receive the verification email. So I tried to log on using google. But I need to create a password for the account. I read in the web that if you log out and say that you forgot the password, choose to reset the password, you can create a new password that way. However, I didn't receive the email as well. And now I'm lock out of bitbucket even if I use log in using google option.

Anyway I can recover or re-setup the account? Cos that email is kind of fix, I can't make a new one. Any help would be greatly appreciated! Thank you in advance!


Answers:
author: Caroline R
body: Hi, [@cntt-antbot](/t5/user/viewprofilepage/user-id/4510138)! Welcome to the community!

I checked our logs and confirmed that your email had a block on the server that prevented emails from being sent to your address, so that's the reason you didn't receive these emails. This can occur when the system tries to send an email and the account does not exist yet, it's not activated, or it rejects the email for some internal reason.

In this case, I removed your email from this suppression list and now you should be able to receive the email with the recovery link to your Bitbucket account.

Could you please test it again and confirm if you receive this email? You can follow the next steps to do that:

* Access the page [https://bitbucket.org](https://bitbucket.org/) and select the option to log in

* Select the option **Can't log in?**

* Inform your email and click on **Send recovery link**

* You should receive an email to set a new password

Please let me know how it goes and feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline

comments: author: cntt-antbot
body: Thank you very much! I was able to reset my password now. Thanks for your help! I appreciate it!


Tags: bitbucket-cloud

cloud
Is there a way to export history graphs via command line
Asked by Bernhard Weichel:

I plan to write particular tutorials. Sourcetree has excellent history graphs. Is there a method to export those in particular from a command line?

I write a shell script which performs some actions in the repository and would like to have snapshots of the resulting history graph.


Answers:
author: stevestreeting
body: Sorry, no - but you might be able to use something like the built-in 'screencapture' command in OS X?
Selecting a default Pull branch
Asked by Ricardo Chavarria:

Since I created a new branch in my repo, when I select pull, I no longer get a default branch selected. This has also caused the number of updates shown in pull and push buttons to not show up.

Does anyone have a way to fix this?

Thanks!

![](../../../upfiles/Screen_Shot_2012-09-22_at_1.16.40_PM_1.png)


Answers:
author: stevestreeting
body: You may have accidentally changed your tracking branch setup - to change this, right-click on your local branch in the sidebar, select 'Track Remote Branch' and then pick the branch you want to pull by default.
how can I utilizes read-tree respecivele git subtree in sourcetree
Asked by Bernhard Weichel:

I have a library which applies to several projects. I started using submodule but I wanted others to simply checkout the project and get everything they want.

I played around with the following sequence on the command line according to <https://help.github.com/articles/working-with-subtree-merge>

It initially worked but I honestly did not really understand what I was doing. Later it happend that one of the consuming projects was pushed entirely to the library - which is definitely not intended.

Is there a fool - proof way to use read-tree or even git subtree with sourcetree.

Thanks in advance and thanks for sourcetree.


Answers:
author: stevestreeting
body: SourceTree doesn't support subtree yet, only submodules. Subtree was an experimental replacement for submodules and isn't used very widely yet AFAIK.

comments: author: Bernhard Weichel
body: git subtree is a convenience script around git read-tree. git read-tree on the other hand is long available in git.

git subtree is now part of the official git sources (still in contrib).

However it is, all these things are somehow difficult to handle and a support in sourctree would be ammazing.

I currently start to create scripts in my project to handle these things. A part of help would be, if I could invoke these scripts from within sourcetree.


author: stevestreeting
body: You can invoke any outside script from inside SourceTree using Custom Actions - please see Preferences \> Custom Actions and this blog post for details: <http://blog.sourcetreeapp.com/2012/02/08/custom-actions-more-power-to-you/>
Stash management in Sourcetree
Asked by Alex Bou?nard:

Hi folks,

I am really impressed by Sourcetree ease-of-use !

I am wondering though if there is a way of sharing stashes/shelves with other users ?

Thanks,

Alex


Answers:
author: stevestreeting
body: I'm glad you like SourceTree!

Stashes and shelves are only really designed for local use, if you want to exchange them with others then you can use the 'Create Patch' action instead (and they can use 'Apply Patch').

Hope that helps!

comments: author: Munish Singla
body: Is there any way to share stash with other user.


Tags: bitbucket-server
What does the "Track?" checkbox do?
Asked by Antti Ahola:

When I push changes to repository the dialog with repository and branch selections have checkboxes that are named "Track?" and have 3 states; empty, checked and "-".

I think they have something to do with git tracking branches feature(?) but why three states, and what those states mean?


Answers:
author: stevestreeting
body: Checked = Set the remote branch to be the one the local branch should track

Unchecked = Stop the local branch tracking anything

Mixed (-) = Don't change any tracking on this branch, leave it as-is

The latter is the default so that you can push ad-hoc to different remotes / branches from a local branch and not change the tracking setup (neither setting it to a new branch, or unsetting it to stop tracking)

comments: author: Antti Ahola
body: Thank you. I'm worried if I can accidentally mess up by checking multiple branches, but I'll probably just leave the checkbox as defaut.


author: stevestreeting
body: No, you can't mess up since each row is a local branch. If you checked multiple branches all it would mean is that each of those local branches would track the remote branch listed next to them (if pushed).


author: Kent Signorini
body: So what does it mean to have the local branch tracking the remote?


author: bjennings76
body: I was confused about this too, so I did some research.

A 'tracked' branch is the default remote branch for the local branch, so if you use 'git pull' or 'git push', Git knows which remote branch to use.

SourceTree uses the tracked branch to know what state you are in locally. If you switch the 'tracked' branch, SourceTree will show that new branch by default next time you open the push/pull dialogs. SourceTree will also change how it displays the notifications of how many commits ahead/behind your local branch is.

There's more info about Git's tracked branches here:  
[](http://git-scm.com/book/en/Git-Branching-Remote-Branches#Tracking-Branches)<http://git-scm.com/book/en/Git-Branching-Remote-Branches#Tracking-Branches>
using python libs and mercurial from virtualenv
Asked by S2HC_johan:

Hi,

I'm using sourcetree and like it alot, however I now have to use a precomit hook from a python lib like

```
[hooks]precommit=python:myhookslib.hghooks.precommit
```

This worked on my other computer, now however this lib is installed in a virtualenv. I've choosen the mercurial lib installed in this virtualenv, but it doesn't seems like the default python environment is started. Is there any way for me to specify what python environment sourcetree should use, like a global variable or even better if I could specify it for each repository.


Answers:
author: S2HC_johan
body: You can alter the script in

```
~/Library/Application\ Support/SourceTree/userhg_local/hg_local
```

In that file you alter the shebang from

```
#!/usr/bin/env python
```

which in general is the correct way to do it, to

```
#!/path/to/my/virtualenv/bin/python
```


author: S2HC_johan
body: Ok, but the reason for having a virtualenv is to minimize the changes I do to the system. The problem is solved for me, but it would be nice to be able to specify wich python binary that should be used, that wold allow for use with virtualenvs


author: stevestreeting
body: SourceTree will just use whatever is your default system Python, so if you made the virtualenv version the one that's used by defualt that might work. Unfrotunately to set this across OS X apps rather than the terminal you have to edit /etc/paths rather than just set PATH.


author: S2HC_johan
body: I found that I could alter the script in \~/Library/Application Support/SourceTree/userhg_local/hg_local to start with

```
#!/path/to/my/virtualenv/bin/python
```

Although this resolvs my issue for now, I don't know what will happen after an update. Is there a better way to do it?
long commit message
Asked by Janos Kukoda:

Hey!

I use SourceTree, I realy love it. Just one thing. If I add a longer commit message, it is annoying if I can't read it after that. I don't know how would it look like, but maybe if you would break it to more lines, ..

Regards, J?nos


Answers:
author: stevestreeting
body: I'm not sure what you mean - if the commit message is too long to fit in the log table, you can see the whole detail by clicking on the commit and the full message will be displayed in the panes underneath. You can use the return key to add new lines to commit messages if you like, there's no limit.

comments: author: Janos Kukoda
body: Hey!

Here I have what Is see. I mean the Description of the commit. I can't see the whole description. Hmmm.

![](../../upfiles/Screen_Shot_2012-09-11_at_3.34.44_PM.png)


author: stevestreeting
body: There is a splitter above the file list which you've dragged somehow to be zero-height, hiding the commit details pane. Put your mouse pointer above the file list until it turns into a split pane resize pointer, and drag the split downwards so you can see the commit details.
Extend file log to all include all history
Asked by Robert Altman:

When viewing a revision in SourceTree, it is possible to right-click on a specific file and view the change log for just that file; however, this log is limited to no later than the revision where you right-clicked.

How is it possible to extend the file log to all future revisions (of that file), so you can see all changes, not just those before that point in time?

Thanks!


Answers:
author: stevestreeting
body: The reason it's done that way is that the file-specific log is currently just linear (no graph, just a simple history) to show how the file got into that state. If in the future the history diverged into multiple branches that wouldn't work. For simplicity the file history was kept to just 'how did I get here'.

An alternative is to use the File Status view (Cmd-1), switch to 'Show All' and start typing the name of the file in the search to find it quickly, then do Log Selected from there, which will give you all the history to the current day.

comments: author: Martin Fowler
body: I get irritated by this regularly too, and have a UX suggestion. How about showing all the commits on this file that are ancestors of head? That way you'd have a linear history and I think that's what I usually want.
Why does Atlassian advertise sourcetree as a subversion client when it is not one?
Asked by Frank Saldana:

Sourcetree does not support svn natively. It is a GIT-SVN bridge frontend at best. I wasted a lot of time trying to get it to work with my already checked out svn working copy.


Answers:
author: Hiten Parmar
body: I'd like to know what server folder structure is required. Is is the standard (trunk, branches, tags)? Is this changeable? If I have a fresh SVN repo can SourceTree create that base folder structure?

comments: author: stevestreeting
body: If trunk/branches/tags exist as a direct subfolder of the URL you pass then it will be detected and used as such, otherwise it's assumed that you're just cloning a single branch.

SourceTree can't create that svn structure for you, it has to exist already. The interoperation with Subversion is limited by git-svn / hgsubversion, which is a translation layer and designed to interoperate with existing repos, not to set them up. The merge data that git / hg use is more sophisticated than Subversion and cannot be translated, which is why you're advised to simply track SVN branches rather than create them or merge them, which should still be done with a native svn tool.

Most people use git-svn and hgsubversion either only for a relatively short time before migrating fully to git or hg, or for external projects which they use fairly infrequently. The translation layer is good, but it's not designed to be a first-party option; if you're still 100% Subversion you'd be better with a dedicated Subversion tool; the branch / merge data in git / hg is more sophisticated than Subversion and cannot be losslessly translated, so you're meant to use it to maintain / track svn but not create brand new structures or do lots of merging on the svn side. As a long time CVS and SVN user myself before moving to DVCS, I couldn't imagine going back to SVN now and only use svn repos for old legacy projects or dependencies which haven't moved yet, and for this, git-svn and hgsubversion via ST is extremely useful (I can still use one tool to do everything). But that's because I don't create any new Subversion projects any more.


author: stevestreeting
body: The intention wasn't to mislead, simply to illustrate the option - you can indeed use SourceTree with Subversion (and many people do), just not with local svn checkouts. The git-svn / hgsubversion local repos are more powerful than the equivalent svn checkout anyway. But we'll look at clarifying this.

comments: author: Josh Sutphin
body: Will you also look at clarifying the undocumented dependencies? To get SourceTree to even recognize an SVN server, I had to install Subversion separately, install Homebrew and its Subversion Python bindings, and install the subvertpy package... all manually, and all undocumented.


author: jwaterwash
body: I've only wasted about 15 minutes so far, but I'm in the same boat.
When I commit I have to check the sign off option every single time? Is there a way to keep it checked by default? Thanks!
Asked by Namrata Bandekar:

When I commit I have to check the sign off option every single time? Is there a way to keep it checked by default? Thanks!


Answers:
author: stevestreeting
body: There's no option to keep it checked right now, mostly because I thought signing things off should be an explicit action. There isn't an option in git to make it the default either, it seemed to me it was intended to be always opt-in to retain its significance?
my source tree show mess code when there are chinese
Asked by Jery Ren:

my source thee show mess code in commit message,when i write some chinese in commit message, it will show mess code rather than chinese. it work correctly before?i don't know why.

thinks for your help


Answers:
author: wolfired
body: First, there are some files with chinese characters and they had committed! Then in the Log panel, i saw mess code in some of them, others are ok!

Second, i try to delete characters shown as mess code, then in the File status panel, i saw the deleted characters is show correctly!

Third, i add BOM to the file, everything is ok!


author: yomybaby
body: I have a smillar problem. It works correctly befre. but only 1 repository shows gabage commit message. (the message include Korean)

comments: author: stevestreeting
body: As noted above, this happens when someone commits with badly encoded characters, and it can cause problems for a while after that commit because SourceTree retrieves the log in batches of 200 lines at a time, the encoding can screw up the text decoding for many lines. If you click on the commits afterward you should find the commit details below look OK.

We're tracking this one here and hope to mitigate this data problem better in 1.6 <https://jira.atlassian.com/browse/SRCTREE-1285>


author: stevestreeting
body: SourceTree supports UTF8 characters in commit messages, and this works fine for extended characters including Chinese.

If the view shows garbage, it's usually caused by the commits having been created somewhere else and encoded through some other non-UTF8 encoding scheme. UTF8 is the most widely supported.

comments: author: Jery Ren
body: first ,thanks for your help.but my colleague's source tree works fine.we use the common git souce code?which means our commit messages are all the same.Today, I suddenly found my source tree show commit messages correctly,it works fine again.i don't know why.

Thanks again for your help :)