Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Un-deprecate :auth profile since full-disk encryption is a good use c…

…ase for it.
  • Loading branch information...
commit 329b4b7fa65aa05f986091e0bb6ee6a06fad34c9 1 parent 96e02b9
@technomancy authored
Showing with 20 additions and 7 deletions.
  1. +19 −1 doc/DEPLOY.md
  2. +1 −6 leiningen-core/src/leiningen/core/user.clj
View
20 doc/DEPLOY.md
@@ -3,7 +3,7 @@
Getting your library into [Clojars](http://clojars.org) is fairly
straightforward as is documented near the end of
[the Leiningen tutorial](https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md).
-However, deploying is not always that straightforward.
+However, deploying elsewhere is not always that straightforward.
## Private Repositories
@@ -54,6 +54,8 @@ set up credentials, but it's convenient to set it so you don't have to
re-enter it every time you want to deploy. You will need
[gpg](http://www.gnupg.org/) installed and a key pair configured.
+### GPG
+
If you specify a `:creds :gpg` entry in one of your `:repositories` settings
maps, Leiningen will decrypt `~/.lein/credentials.clj.gpg` and use that to find
the proper credentials for the given repository.
@@ -98,6 +100,22 @@ the passphrase multiple times if the agent is not configured. To
disable signing of releases, set `:sign-releases` to false in the
`:repositories` entry you are targeting.
+### Full-disk Encryption
+
+If you use full-disk encryption, it may be safe to store your
+credentials without using GPG. In this case, you can create an `:auth`
+profile containing a `:repository-auth` key mapping URL regexes to
+credentials. Your `~/.lein/profiles.clj` file would look something
+like this:
+
+```clj
+{:user {...}
+ :auth {:repository-auth {#"blueant" {:username "milgrim"
+ :password "locative1"}}}}
+```
+
+### Credentials in the Environment
+
Unattended builds can specify `:env` instead of `:gpg` in the
repository specification to have credentials looked up in the
environment. For example, specifying `:password :env` will cause
View
7 leiningen-core/src/leiningen/core/user.clj
@@ -102,12 +102,7 @@
(dissoc (merge gpg-creds resolved) :creds)
resolved)))
-(def profile-auth-warn
- (delay (println "Warning: :repository-auth in the :auth profile is deprecated.")
- (println "Please use ~/.lein/credentials.clj.gpg instead.")))
-
(defn profile-auth [settings]
(if-let [repo-auth (-> (profiles) :auth :repository-auth)]
- (do (force profile-auth-warn)
- (merge settings (match-credentials settings repo-auth)))
+ (merge settings (match-credentials settings repo-auth))
settings))
Please sign in to comment.
Something went wrong with that request. Please try again.