Setting up spacemacs for development — Part 2 (proxy and git)

Ramz
1 min readFeb 17, 2019

--

In this part we are going to see the following things

  1. Enable git layer
  2. Configure github access
  3. Configure Proxy

Enable git layer

Make sure in the list of layers enabled, git is one of them

dotspacemacs-configuration-layers
'(
git
)

Configure github access

Make sure in the list of layers enabled, github is one of them

dotspacemacs-configuration-layers
'(
github
)
  1. To access Github api, create an api token using https://github.com/settings/tokens.
  2. Create a file called ~/.authinfo
  3. Add the following line to the ~/.authinfo and save it.
machine api.github.com login your-github-username^magithub password token-copied-from-step-1

Storing passwords in plain text is a very bad idea. You can fix this by using GPG. For mac users, download and install GPG Suite.

Once you have setup GPG on your machine. Just use ~/.authinfo.gpg to store the above line. Emacs will transparently encrypt it.

Configure Proxy (optional)

If you are using proxy for your work, then you need the following. Add the below snippet after dotspacemacs/user-config

Also add the (module/proxy) to your dotspacemacs/user-init

(defun dotspacemacs/user-init ()
...
(module/proxy)
)

Adjust the proxy based on your needs. With this you should be able to set and unset your work proxy using spc p w and spc p W

--

--

Ramz

Cloud Architect, Polyglot Programmer, Hacker, DevOps Practitioner & AI Enthusiast