youngmon/atlassian-qna huggingface dataset:
Repository variables and property files
Asked by David Smiles:

Hi all,

I'm currently using a BitBucket pipeline to run a Maven / Java JUnit tests to exercise a REST API. This runs fine, but it requires a username and password which is currently written in a property file. I want to move the values from the property file and into some respository variables, but retaining the property files.

I've configured the respository variables and and I can access them in my pipleline script using $VARIABLE_NAME, etc.

However, I don't know if its possible, but can I also use the same repository variables in my property files which my Java program reads when starting?  

For example, I have property file called database.properties with some configuration and inserted the respository variables like this:

database.server=${DATABASE_SERVER}

database.username=${DATABASE_USERNAME}

database.password=${DATABASE_PASSWORD}

somevalue=${VARIABLE_NAME}

When I run the pipleline, the variables are read fine in the bitbucket-pipeline.yml file, but when the program runs there are no values in the property file. Is there some additional processing of the properties file required?

Any help or advice is appreciated.

Kind regards,  
David


Answers:
author: Patrik S
body: Hello [@David Smiles](/t5/user/viewprofilepage/user-id/4608981)

Thank you for reaching out to Atlassian Community!

I've reviewed your case, and as per [Variables and Secrets](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/) documentation, when your pipeline build starts, all the user-defined variables are configured as *Environment Variables* in the build container.

As you already confirmed, the commands and scripts invoked on the YML can use the variables by referencing them as *$VARIABLE_NAME* . However, each language handles/references environmental variables differently, and it's up to your program to interpret that. In your case, you can have your environment variables in the properties file, but Java will **not** automatically recognise them as environmental variables and therefore will not replace them with their actual values.

To help you proceed further, I have the following suggestions :

* Write a function in your Java program that handles the environment variable substitution when you read the property file
* Instead of reading from the property file, directly reference the variables in your Java program, as this example:  
  *

        System.getenv("VARIABLE_NAME")

Hope that helps to address your question! Feel free to share any additional concerns with this case.

Best regards,

Patrik S

Atlassian Support Engineer


Tags: bitbucket-pipelines

bitbucket-cloud

cloud
I am not receiving bitbucket invitation emails
Asked by kushasdosro:

My friend has invited me to a repository but i am not getting any invitation emails. This is creating problems. Please help


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

I performed an analysis on our logs and confirmed that your email had a block on the server that prevented emails from being sent to you. This can occur when the system tries to send an email to the user and the account does not exist yet, is not activated, or it rejects the email for some internal reason.

In this case, I have removed the block from your email. Could you please ask your team to **remove** the invitation and send you a new one? They can do this by following the next steps:

In case they have invited you to a **specific repository**:

* Access the workspace \> Go to the repo they have invited you to;

* Access the **Repository Settings** \> **User and group access;**

* Click on the "invitation pending";

* Select the "**Cancel invitation**" option to remove the invitation;

* Add your email again to send a new invitation.

In case they have invited you to a **group on this workspace**:

* Access the workspace \> **Settings**;

* Access **User groups** \> Open the group they have invited you to**;**

* Click on the "invitation pending";

* Select the "Cancel invitation" option to remove the invitation;

* Add your email again to send a new invitation.

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

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Not able to start BItbucket server on centos
Asked by Sumedh Mahajan:

java.lang.IllegalStateException: failed to obtain node locks, tried \[\[/home/bitbucket/Bitbucketsetup/data/shared/search/data\]\] with lock id \[0\]; maybe these locations are not writable or multiple nodes were started without increasing \[node.max_local_storage_nodes\] (was \[1\])?  
at org.elasticsearch.env.NodeEnvironment.\<init\>(NodeEnvironment.java:302)  
at org.elasticsearch.node.Node.\<init\>(Node.java:362)  
at org.elasticsearch.node.Node.\<init\>(Node.java:289)  
at org.elasticsearch.bootstrap.Bootstrap$5.\<init\>(Bootstrap.java:227)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the community!

This usually means what it says - there's a problem reading and writing the disk for some reason. Sometimes, this is down to unsuitable storage, or you (as it says) have configured it with too small a disk allowance, but the usual culprit is that the account running Bitbucket does not have the right permission to read/write the directory you have told it to use.


Tags: bitbucket-server
Bitbucket Server Installation on Linux Centos VM
Asked by Sumedh Mahajan:

After trying to run bin/start-bitbucket.sh ,getting this error {#toc-hId--1212274832}
-------------------------------------------------------------------------------------

    atlassian-bitbucket-7.17.0]# uncaught exception in thread [main]java.lang.RuntimeException: can not run elasticsearch as root        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:111)        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)        at org.elasticsearch.cli.Command.main(Command.java:90)        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)


Answers:
author: Nic Brough -Adaptavist-
body: This is exactly what it says it is. Do not run Bitbucket as root, it is insecure and does not work.

Try running it as the bitbucket user.
one of my employee not getting verification email notification
Asked by arun:

one of my employee not getting verification email notification

How can i view the suppression list or can u please remove the suppression list if any?


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

I checked the workspaces you have access to and confirmed that there was one user who was invited 3 days ago and hasn't accepted the invitation yet, so I believe this is the user you are referring to. Please let me know if that's not the case.

I performed an analysis on our logs and confirmed that this email was in a suppression list due to a hard bounce event with the following message:
> Erro 550 No Such User Here

This error indicates that the email address does not exist in the domain. The domain is correct, but the information before the "@" in the email address may have been mistyped or the mailbox does not exist/has not been activated yet.

In any case, I went ahead and removed the email from the suppression list.

Now, I suggest that you confirm with the user if the email is correct, **remove** the invitation and send them a new one. You can do this by following the next steps:

In case you have invited them to a **specific repository**:

* Access the workspace \> Go to the repo you have invited them to;

* Access the **Repository Settings** \> **User and group access;**

* Click on the "invitation pending";

* Select the "**Cancel invitation**" option to remove the invitation;

* Add the email again to send a new invitation.

In case you have invited them to a **group on this workspace**:

* Access the workspace \> **Settings**;

* Access **User groups** \> Open the group you have invited them to**;**

* Click on the "invitation pending";

* Select the "Cancel invitation" option to remove the invitation;

* Add the email again to send a new invitation.

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

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
I'm not receiving verification emails from Atlassian
Asked by Leon-915:

Hi,  
I've tried to set up a new account for BitBucket for my work and apparently have had the verification email sent, the email address is correct however I'm not receiving any verification emails?

I've tried re-sending the email a number of times and haven't received any of them.

My email is \<email removed for privacy reasons\>

Kind regards,

Leon


Answers:
author: Caroline R
body: Hi, Leon! Welcome to the community!

We have contacted our internal team to investigate this issue and they have confirmed that your domain has blocked our IPs, so this is the reason you were not receiving our emails. We have reached out to them to unblock our IPs.

Could you please test it now and confirm if you receive the email?

Thank you.

Kind regards,  
Caroline
About atlassian/email-notify, is there a way to increase de limit of recipients?
Asked by Daniel Sartorio:

I need to send an email to seven people, but when i increase the number of recipients from six to seven i receive the following error

INFO: Sending email...  
X Failed to send email to example.1@email.com;example.2@email.com;example.3@email.com;example.4@email.com;example.5@email.com;example.6@email.com;example.7@email.com;. Check your configuration settings.  
With six recipients it works fine, but not with seven. Is there a workaround this issue  
Regards  
Daniel Sartorio


Answers:
author: Oleksandr Kyrdan
body: Hi [@Daniel Sartorio](/t5/user/viewprofilepage/user-id/4608579) ,

Thank you for your question!

The [email-notify pipe](https://bitbucket.org/atlassian/email-notify) doesn't have any limits for the number of recipients.

Have you try with comma-separated list:

```
example.1@email.com, example.2@email.com
```

Also, it would be nice if you provide us with more details about your pipelines configuration.

Best regards,  
Oleksandr Kyrdan

comments: author: Daniel Sartorio
body: Hi,

Thank you for the quick response.

I haven't tried it, because it worked fine with semicolons, up to six recipients.

But now that you mentioned it i tried, and it was successful. So problem solved.

Again, thank you.

Regards  
Daniel Sartorio


Tags: bitbucket-cloud

bitbucket-pipelines

email

notification
5 user limit error when adding 5th user to Bitbucket?
Asked by Jeffery Joseph Faneuff:

#AtlassianTeam? Ana Retamal?

I tried to add a new user to the a few of the repos in my Bitbucket account and they got the 5 user limit error on 2 repos even though they are only the 5th user overall. Why? How to fix this without upgrading. She was able to access one of the repos ... ljcerts. I checked all the repo users to see if I miss counted, but total overall is only 5 including me.  

<br />

I have 2 workspaces. One with 4 repos and the other with 1 repo.

Thanks, Jeff

\<images removed due to privacy reasons \>


Answers:
author: Caroline R
body: Hi, [@Jeffery Joseph Faneuff](/t5/user/viewprofilepage/user-id/4524616)!

Thank you for reaching out to Atlassian Community!

I have checked the workspace you mentioned and confirmed that this is under a free plan and there are 5 users in it, which is the [limit for a free plan](https://www.atlassian.com/software/bitbucket/pricing).

By reviewing the invitations on this workspace, I understand you are trying to invite a user who already has access to this workspace, is that correct? If that is the case, could you please remove the invitation that is pending and add this user to this repo again?

Just a heads up, I removed all the private information from your post to protect your privacy.

Looking forward to hearing from you.

Kind regards,  
Caroline

comments: author: Jeffery Joseph Faneuff
body: I removed the invitation that is pending and re-added her to the users of the repo ljservices. That worked. Must have been a glitch in BitBucket user tracking. THANK YOU.


author: Caroline R
body: Hi, Jeffery!

Thanks for confirming that it worked! I'm glad to know that :)

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

error

free

plan

user

workspace
On OSX Mavericks SourceTree errors
Asked by Corey:

I get the following error when opening any existing bookmark and waiting for the file diff to show.

'git status' failed with code -1:'Couldn't posix_spawn: error 9

'

I just upgraded to Mavericks today and the issue just started happening. I deleted the app and reinstalled and the same error occurs.


Answers:
author: KieranA
body: Hey there,

The resolution to this is wiping your user preferences. Could you make sure you backup your config as this guide states: <https://confluence.atlassian.com/display/SOURCETREEKB/Wiping+SourceTree+Preferences>

Follow the steps and it should resolve the issue. Could you also open a [jira.atlassian.com](http://jira.atlassian.com) issue (set it to Reporters and Developers so only we can see it) and include your configuration files that should've been backed up if possible? Using this we can discover what the problem is in SourceTree.

Thanks in advance!

comments: author: Timm Stokke
body: Thanks!

This also solved the problem I was having with "SourceTree quit unexpectedly" after upgrading to OSX Maverics.


author: 16cards
body: Upon installing Mavericks I also had these crashes. Wiping preferences worked.

However, opening my MBP this morning, SourceTree crashed and continues to when I try to start. Wiping preferences again works.

Is performing this action the permanent fix?
[Feature Request] SourceTree option to automatically stash before pull & unstash after successful merge
Asked by mattijsf:

I've used SmartGit HG for a while but now I switched to SourceTree. One feature that I'm used to and really missing in SourceTree is the auto stash feature. Current pull workflow:

1. Currently on master
2. Made some code changed but I'm not yet ready to commit
3. My collegue pushed some changes I want to make use of before committing my code changes
4. I perform a pull in SourceTree. But now SourceTree wants me to commit or stash my changes.
5. Since my commit is not yet ready I'm stashing my changes.
6. I again click pull in SourceTree to fetch the changes
7. I apply my stash

When I'm having the same scenario in SmartGit HG it will ask me to stash my changes (if any) before pulling and it will automatically apply the stash when the changes are successfully pulled. This works much faster and I think it's quite elegant. It even has the option to always apply this approach on every pull.


Answers:
author: Jeff Thomas
body: Hi Mattijs,

There is an open feature request for this in the SourceTree JIRA - <https://jira.atlassian.com/browse/SRCTREE-1732>

You can vote on that issue to let the SourceTree team know that it's an issue you're interested in.

comments: author: manabu
body: Now this is pretty available directly in IntellJ and XCODE, I think we will all begin to expect it. The main reason I want this the most is that there are some derived changes like build number increments which I do not care to merge or push.


author: pradipvaghasiya
body: You can add script as Custom Action to do the same.

Script can contain

git stash \&\& git pull --rebase \&\& git stash pop


Tags: bitbucket-server

pull-request
Setting up SourceTree for Wordpress development on a Mac
Asked by benutzerfreund:

I am new to SourceTree and would like to use it to develop Wordpress child themes on a Mac. Are there any guides/tutorials on how to set this up?

I am new to version control in general, so the tuts on setting up Git with Terminal/command line are a little bit too advanced for me...

And, yes, I did a Google search for this.

Thanks for any hint!


Answers:
author: KieranA
body: We have some built-in help documents with SourceTree. We're looking at getting these online, too. Hit the "Help" menu and go to "SourceTree Help"

Cheers

comments: author: benutzerfreund
body: Thanks for your swift reply. I did see the help section, but I am lookin for something as a tutorial specifically for setting it up for WordPress development... Any idea?


Tags: mac

wordpress
Branches no longer getting forked to a new graph line
Asked by emichaelb:

In Sourcetree, when I click the Branch icon, enter a New Branch Name and leave the other defaults, click CreateBranch, the branch is created but shows up in the same graph line as its parent. I.E. no forking of the graph. This is relatively new behavior. Is there some setting I've messed up? Thanks.

e michael


Answers:
author: KieranA
body: Hi Michael,

This is because your commit history hasn't yet diverged. In terms of ancestor order the new branch has a linear history. Branches will show once the branch you branched from contains commits which aren't in the branch you created. The log view will have branch indicators on the commits to show what belongs to which branch anyway. You can also use the filters in the log view to make sure what you're viewing is on that branch, too.

Hope that helps

comments: author: emichaelb
body: \> "Branches will show once the branch you branched from contains commits which aren't in the branch you created"

Ahh, so that's the key here. Thanks for clarifying this. - e michael
SourceTree/Hg does not indicate active Branch with Hg-Flow?
Asked by desregular:

I just initialized HgFlow (on an existing repo), started a feature F, and double clicked it to "Branch Switch to F". I do not see any indication in the side panel that "F" is now my active branch. Shouldn't I?

Thanks!


Answers:
author: KieranA
body: Hey DesP,

The branch will be in bold and there'll be a different branch icon next to it (it'll have a tick on top of the branch icon).

Cheers


author: leedy
body: It should show up as Bold. That's the only indication I ever see.
Branchs on Git Remote not Updating
Asked by pauloelr:

Hi,

I Just installed SourceTree to test the software and i'm facing something that i don't know if it's a bug or a missconfiguration:

I have a local repository that track two GitHub's Repositories, my own repository and the repository where i fork from, when i try to pull from the repository where i fork from i click on the "Pull" button on toolbar and select "upstream" (the name of the remote) i think this should refresh the list of branchs in the remote but after a while trying to refresh the list is showed empty, the repository in question is the ofical Zend Framework 2 wich has a lot of branchs and PR's, perhaps by the number of remote branchs SourceTree could be timing out the request, is there something i can do to solve it?

The same thing happens also on ZF2-Docs Repository but in this one besides this problem i have another one, on the sidebar no branch is showed on "upstream" remote, and i don't know how to refresh this list.

Thanks


Answers:
author: pauloelr
body: Hi Kieran,

I'm not attempting to clone teh repository, it's a repository that i alredy have cloned before install SorceTree, i'm trying to do a Git Pull, but the repos are these:

<https://github.com/zendframework/zf2.git>

<https://github.com/zendframework/zf2-documentation.git>

Also, here it's my remote list on both repositorites

D:\\Projetos\\ZendFramework \[master\]\> git remote -v  
origin <https://github.com/pauloelr/ZendFramework2.git> (fetch)  
origin <https://github.com/pauloelr/ZendFramework2.git> (push)  
upstream <https://github.com/zendframework/zf2.git> (fetch)  
upstream <https://github.com/zendframework/zf2.git> (push)

and

D:\\Projetos\\ZendDocs \[master\]\> git remote -v  
origin <https://github.com/pauloelr/ZendFramework2Docs.git> (fetch)  
origin <https://github.com/pauloelr/ZendFramework2Docs.git> (push)  
upstream <https://github.com/zendframework/zf2-documentation.git> (fetch)  
upstream <https://github.com/zendframework/zf2-documentation.git> (push)

The list of the origen branchs are been updated correctly, but not from upstream


author: KieranA
body: Hi Paulo. Could you provide the URL to the repository in question? (The Git URL you're attempting to clone from, that is). Thanks in advance!
pre-recieve hook giving strange [K line endings with remote output in SourceTree
Asked by Gideon Dominick:

When my pre-receive bash script hook outputs via echo "foo" or \`git cat-file blob\` etc... i get output like

remote: foo bar \[K

remote: baz bang \[K

remote: biz bop boop bap bing \[K

with those '\[K' getting appended to everyline, i am not sure what is causing it or how to get rid of it. It only seems to happen on lines that have text on it, not blank lines, but i might be wrong about that.

EDIT:

It seems this strange string has a esc caracter in it, from the ascii tables

Oct Dec Hex Char

033 27 1B ESC (escape)


Answers:
author: Foong
body: Hi all,

Please refer to the bug report at <https://jira.atlassian.com/browse/SRCTREEWIN-2766>


author: rsmike
body: Same issue!
> It only seems to happen on lines that have text on it, not blank lines

Only happens with non-empty lines.


author: Delcoigne Renaud
body: I have the same issue ...

[](/questions/256726/k-characters-at-the-end-of-each-line-in-custom-hook-output)<https://answers.atlassian.com/questions/256726/k-characters-at-the-end-of-each-line-in-custom-hook-output>