Open nijel opened 7 years ago
I am curious as to whether it is possible to do this yet with self-hosted installations? I have the credentials already saved and working at the shell level until the weblate user, but weblate itself seems to be failing to work with it.
You need to store them in DATA_DIR/home/.git
, it should work then. There is no support in Weblate for that right now.
Sorry, I missed your update which would have really helped 👍 as now I am only having an issue where overnight it says it can't find the origin repo, yet does fine when I pull them but I guess that's a separate issue.
On my own, I did eventually track this down by putting a load of debug into the vcs/base.py, vcs/git.py and trans/models/component.py to dump out what is was passing to the subprocess.
It wasn't very clear in the documentation or I clearly missed it that the environment is cleared down and the HOME environment variable repointed.
We just used this to modify .gitconfig
- be aware the this results in the following error:
Committer identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got '1040@weblate.(none)')
(128)
To make this work you'll have to add the committer (user) info to the .gitconfig:
[credential]
helper = store
[user]
name = Weblate
email = weblate@my-domain.com
With some services (as Bitbucket) the user is authenticated by email and password for https access to the repository. There is currently no way to do this in Weblate.
There is solution to use git credentials to handle these:
git config --global credential.helper store
~/.git-credentials
file:Note that both username and password have to be urlencoded to avoid problems with special chars.