summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org6
-rw-r--r--lisp/srht.el6
2 files changed, 8 insertions, 4 deletions
diff --git a/README.org b/README.org
index e8baf26..78ce1ec 100644
--- a/README.org
+++ b/README.org
@@ -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