I wanted to use Saltstack‘s gitfs to easily reference salt formulas from my gitolite repository over ssh using key-based authentication. In order for salt-master to do this, you need pygit2, which needs libgit2, which isn’t yet packaged by ubuntu. You can download a libgit2 deb file, but that doesn’t have libgit2 compiled with SSH support, so I had to compile from source:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo aptitude install pkg-config libssh2-1-dev libhttp-parser-dev libssl-dev libz-dev | |
wget https://github.com/libgit2/libgit2/archive/v0.22.0.tar.gz | |
tar xzf v0.22.0.tar.gz | |
cd libgit2-0.22.0/ | |
cmake . | |
make | |
sudo make install | |
sudo pip install pygit2 |