Configuration File for Basexclient Connection Details?
Wednesday, 25 March 2015 · 5 messages
EK
Eliot Kimber25 Mar 2015 16:09 #
Looking through the docs and trying to tests locally, it appears that the basexclient command does not use the
USER or PASSWORD fields in .basex when run.
That is, given this in my ~/.basex file:
USER = admin
PASSWORD = admin
The basexclient command still prompts me for my credentials.
Is this correct or am I missing a configuration option somewhere?
What I'm looking for is the ability to call the basexclient command from git hooks without those scripts having to maintain their own configuration file for the connection details.
Thanks,
Eliot
—————
Eliot Kimber, Owner
Contrext, LLC
http://contrext.comCG
Christian Grün25 Mar 2015 18:39 #
Quoted text · Eliot Kimber · 8 lines
> Looking through the docs and trying to tests locally, it appears that the > basexclient command does not use the USER or PASSWORD fields in .basex > when run. > > That is, given this in my ~/.basex file: > > USER = admin > PASSWORD = admin
It should actually do so (I just tried, and it worked for me). Did you possibly have another .basex file located in the directory where you started basexserver from?
Just in case you haven't found this by yourself: [1] describes which directories are checked for .basex files when starting BaseX.
Hope this helps,
Christian
[1] http://docs.basex.org/wiki/Configuration#Home_Directory
CG
Quoted text · Eliot Kimber · 5 lines
> However, when I ran basexclient, I got this: > > Contrext01:dfst-sample-project ekimber$ basexclient > /Users/ekimber/apps/basex/.basex: writing new configuration file. > Username:
Do you possibly have any other .basex* file in this directory?
Quoted text · Eliot Kimber · 1 line
> So maybe this is an OS X issue?
Maybe someone else using OSX can have a word on this?
Christian
EK
Hmm, the behavior is a little odd.
This is under OS X.
Under Windows it seems to work as expected: my user-specific .basex file is used. So maybe this is an OS X issue?
I discovered that I did have a .basex file in both basex/ dir and in my home dir.
The one in the basex/ directory had these entries:
USER =
PASSWORD =
SERVERHOST =
So I deleted them to see if the same entries in the ~/.basex file would get used.
However, when I ran basexclient, I got this:
Contrext01:dfst-sample-project ekimber$ basexclient
/Users/ekimber/apps/basex/.basex: writing new configuration file. Username:
And editing the basex/.basex file showed that in fact the empty USER and PASSWORD entries had been restored.
Likewise, if I delete basex/.basex, I get the same result.
So it looks like even when there is a ~/.basex file it's not being used. I also tried putting a property in ~/.basex and it was not set.
Cheers,
E.
—————
Eliot Kimber, Owner
Contrext, LLC
http://contrext.comQuoted text · Christian Grün · 23 lines
On 3/25/15, 12:39 PM, "Christian Grün" <christian.gruen at gmail.com> wrote: >> Looking through the docs and trying to tests locally, it appears that >>the >> basexclient command does not use the USER or PASSWORD fields in .basex >> when run. >> >> That is, given this in my ~/.basex file: >> >> USER = admin >> PASSWORD = admin > >It should actually do so (I just tried, and it worked for me). Did you >possibly have another .basex file located in the directory where you >started basexserver from? > >Just in case you haven't found this by yourself: [1] describes which >directories are checked for .basex files when starting BaseX. > >Hope this helps, >Christian > >[1] http://docs.basex.org/wiki/Configuration#Home_Directory >
EK
When I removed the .basexhome and .basex files from the basex/ directory, then the home directory .basex worked.
So it looks like there's definitely a difference in behavior between Windows and OS X.
I verified that under Windows if I have both a ~/.basex file and the default .basex and .basexhome in the installation directory, the user and password from the ~/.basex file is used.
Cheers,
E.
—————
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com
Quoted text · Christian Grün · 16 lines
On 3/25/15, 1:25 PM, "Christian Grün" <christian.gruen at gmail.com> wrote: >> However, when I ran basexclient, I got this: >> >> Contrext01:dfst-sample-project ekimber$ basexclient >> /Users/ekimber/apps/basex/.basex: writing new configuration file. >> Username: > >Do you possibly have any other .basex* file in this directory? > > >> So maybe this is an OS X issue? > >Maybe someone else using OSX can have a word on this? > >Christian >
Written for BaseX 8.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery