summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2022-01-02 15:36:27 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2022-01-02 15:43:01 +0100
commit98fb7199eb02a3c46bd92943334132adb67f8507 (patch)
tree56634d6e9973db2d4ab6e5df171f979d51975d1c
parente2eaf4486a9fa9003e8531de5d5a48565ef1929d (diff)
downloadmemory-leaks-98fb7199eb02a3c46bd92943334132adb67f8507.tar.xz
Teach git send-email about ~/.authinfo.gpg
-rw-r--r--guides/git.org40
1 files changed, 40 insertions, 0 deletions
diff --git a/guides/git.org b/guides/git.org
new file mode 100644
index 0000000..bf42130
--- /dev/null
+++ b/guides/git.org
@@ -0,0 +1,40 @@
+* ~send-email~ with ~.authinfo.gpg~
+** Step 1: Install ~git-credential-netrc~
+AFAICT not all distributions package this script? As far as those I
+use are concerned:
+
+- On Debian, the =git= package brings
+ =/usr/share/doc/git/contrib/credential/netrc/git-credential-netrc.perl=,
+ but the file is not executable, so it's not as simple as symlinking
+ it from =~/.local/bin=: it must be =cp='ed and =chmod='ed.
+
+- openSUSE does not include anything from =contrib=, I think? So just
+ grab =contrib/credential/netrc/git-credential-netrc.perl= from the [[https://git.kernel.org/pub/scm/git/git.git/][Git
+ repository]], stick it in =~/.local/bin= and =chmod= it.
+
+Now ~git help --all | grep credential-~ should show =credential-netrc=.
+
+** Step 2: Configure ~git send-email~
+In =~/.gitconfig=, assuming a GMail account for =luser@gmail.com=:
+
+#+begin_src conf
+[sendemail]
+ smtpencryption = tls
+ smtpserver = smtp.gmail.com
+ smtpuser = luser
+ smtpserverport = 587
+#+end_src
+
+Most =send-email= guides seem to use the full email address for
+=smtpuser=; I'm putting in just the /local-part/, since that's what is in
+my =~/.authinfo.gpg=.
+
+** Step 3: Configure ~git-credential~
+In =~/.gitconfig=:
+
+#+begin_src conf
+[credential]
+ helper = netrc
+#+end_src
+
+** Step 4: Enjoy 📨