Skip to content

Instantly share code, notes, and snippets.

@doughgle
Created August 14, 2021 12:57
Show Gist options
  • Save doughgle/d1dfb200ed3c49215b5a1e3e61885c63 to your computer and use it in GitHub Desktop.
Save doughgle/d1dfb200ed3c49215b5a1e3e61885c63 to your computer and use it in GitHub Desktop.
This article captures a few problems I encountered on setting up git send-email and how I resolved them.

git send-email

Git send-email is used by the Linux dev community to send patches as opposed to pull requests. Follow the excellent tutorial on https://git-send-email.io/.

If its a case of TL;DR, in the working git repository:

$ git send-email --annotate -v3 HEAD^

This article captures a few problems I encountered and how I resolved them.

For Microsoft Hotmail/Live Outlook

Configure git send-email to use outlook SMTP server.

$ git config --global --edit

Be sure to use the tls option for encryption.

[sendemail]
        smtpserver = smtp-mail.outlook.com
        smtpuser = username@hotmail.com
        smtpencryption = tls
        smtpserverport = 587

If you have MFA configured for your Microsoft account, you'll need to use an app password for git send-email.

For that, go to https://account.microsoft.com/ -> Security -> Advanced security options -> App password -> Create a new app password.

Once you've generated an app password, you can simply enter it at the prompt of the git send-email command.

Git credentials helper

If you don't wanna enter that password at the prompt each time, you can use a git credentials helper. On Ubuntu, one solution is git-credential-libsecret.

sudo apt-get install libsecret-1-0 libsecret-1-dev
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment