diff options
| author | Aleksandr Vityazev <avityazev@disroot.org> | 2024-05-06 13:42:22 +0300 |
|---|---|---|
| committer | Aleksandr Vityazev <avityazev@disroot.org> | 2024-05-06 13:43:37 +0300 |
| commit | e7ee980ff7713c58fa31d620c5679d78c7dde947 (patch) | |
| tree | 3e5e096c8cd9ba30ef508e13638f0bc6496bd125 | |
| parent | 053c79fb41278f11e98c61785e8cc500ed4c853b (diff) | |
srht: srht-token: Use srht-username if available.externals/srht
* list/srht (srht-token): Use srht-username if available.
* README: update.
| -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 |
