`git slatex new` fail because of missing `baseUrl` git config
Hi!
First of all, thank you for this awesome tool. I've been missing this since the beginning of my PhD...
I've managed to use this to upload my existing latex project using git slatex new
command.
However, I've stumbled upon this bug:
(base) ⳩thesis γ4ky git slatex new -u 'kchoi' thesis 'sharelatex.irisa.fr'
DEBUG:git.cmd:Popen(['git', 'init'], cwd=/home/kwon-young/prog/thesis, universal_newlines=False, shell=None, istream=None)
DEBUG:git.cmd:Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/kwon-young/prog/thesis, universal_newlines=False, shell=None, istream=None)
DEBUG:git.cmd:Popen(['git', 'diff', '--abbrev=40', '--full-index', '--raw'], cwd=/home/kwon-young/prog/thesis, universal_newlines=False, shell=None, istream=None)
DEBUG:git.cmd:Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/home/kwon-young/prog/thesis, universal_newlines=False, shell=None, istream=None)
DEBUG:root:No option 'baseUrl' in section: 'slatex'
ERROR:dbus.connection:Unable to set arguments (dbus.Int32(257170381), None, 'kchoi', 'git-slatex') according to signature 'isss': <class 'TypeError'>: Expected a string or unicode object
Traceback (most recent call last):
File "/home/kwon-young/miniconda/bin/git-slatex", line 8, in <module>
sys.exit(cli())
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/sharelatex/cli.py", line 513, in new
repo, username, password, save_password
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/sharelatex/cli.py", line 195, in refresh_account_information
p = config.get_password(base_url, username)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/sharelatex/cli.py", line 36, in get_password
return self.keyring.get_password(service, username)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/keyring/backends/kwallet.py", line 102, in get_password
if not self.iface.hasEntry(self.handle, service, username, self.appid):
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/dbus/proxies.py", line 147, in __call__
**keywords)
File "/home/kwon-young/miniconda/lib/python3.7/site-packages/dbus/connection.py", line 643, in call_blocking
message.append(signature=signature, *args)
TypeError: Expected a string or unicode object
It turns out that it was missing the baseUrl
git config key.
So I manually edited .git/config
to add the baseUrl key like this:
[slatex]
baseUrl = https://sharelatex.irisa.fr
and it worked!
I suppose it forgot to add the base url to the git config before querying it.
Thanks again for this!