diff options
| -rw-r--r-- | README.org | 6 | ||||
| -rw-r--r-- | lisp/srht.el | 6 |
2 files changed, 8 insertions, 4 deletions
@@ -50,7 +50,7 @@ machine sr.ht password TOKEN To store the token use =auth-source.el=, the host must be set to git.sr.ht. #+begin_example -machine git.sr.ht password TOKEN +machine git.sr.ht login LOGIN password TOKEN #+end_example Strongly encouraged for the user to limit the scope of access that is provided by an authentication token. Currently srht-git.el requires at least @@ -71,8 +71,8 @@ If you are using a self-hosted instanse: * Commands -| Function | Description | -|----------------------+---------------------------------------| +| Function | Description | +|------------------------+---------------------------------------| | =srht-git-repo-update= | Update information for git repository | | =srht-git-repo-delete= | Delete existing git repository | | =srht-git-repo-create= | Create git repository | diff --git a/lisp/srht.el b/lisp/srht.el index 1312269..09e2bc0 100644 --- a/lisp/srht.el +++ b/lisp/srht.el @@ -70,7 +70,11 @@ an error. HOST - DNS name of the service." (if srht-token srht-token (let ((token (when-let ((f (plist-get - (car (auth-source-search :host host)) + (car + (if srht-username + (auth-source-search :host host + :user srht-username) + (auth-source-search :host host))) :secret))) (funcall f)))) (unless token |
