gitfs instructions are wrong in the documentation
Referring to Saltstack's GitFS documentation, apt-get install pygit2 doesn't work for Ubuntu 12 LTS. Instead, I had to do this:
$ apt-get install cmake make libffi-dev -y
$ wget https://github.com/libgit2/libgit2/archive/v0.20.0.tar.gz && tar xzf v0.20.0.tar.gz
$ cd libgit2-0.20.0/
$ cmake .
$ make
$ make install
$ ldconfig
$ pip install cffi
$ pip install pygit2==0.20.3
So it's not as easy as the documentation originally portrayed. Might be good to point this out in the page itself, as right now it is not really clear.
I suspect the whole gitfs page needs a lot of work actually. So far I haven't managed to get anything working with pygit2 on private repositories.
EDIT: Don't worry about this comment. git:// doesn't work for pygit2 in my experience, and switching to https while waiting for more transport support worked for me. This is irrelevant to the original point.
What version of salt are you using? The private repository support is very new, and is not in a released version of salt as far as I know. @terminalmage could probably shed some light here.
The docs state quite clearly that the newest version of pygit2 which is supported is 0.20.3. Furthermore, they correctly identify the name of the package as python-pygit2, not pygit2 as your initial post states.
The pygit2 authentication support was added roughly a week ago, so unless you're running a recent git checkout, it will not be supported. Incidentally, this is also clearly communicated in the documentation, as pygit2 support is noted as being new in 2014.7.0, which will be the first feature release containing pygit2 support.
Do you have a specific concern with the documentation? I actually spent the better part of a day last week completely overhauling it and adding tons of information about the new features.
Hi, I was referring to the instruction apt-get install python-pygit2 not working at all, and provided a list of instructions that has been verified to work in my original post.
Sorry for the confusion.
@terminalmage Here's what I get when running apt-get install python-pygit2 in Ubuntu 12 LTS:
root@atlas:~# apt-get install python-pygit2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pygit2
OK... well if that's the case, it's because it's not packaged at all for that platform. Again, this is mentioned in the documentation ("Availability for this version of pygit2 is still limited"). The idea is for us to soon have PPAs due to the lack of packaging support.
I've added a link to the pygit2 install instructions: https://github.com/saltstack/salt/pull/15469
Are there any other areas where the documentation is unclear?
Thanks. I think this means this issue can be closed. :)
This was very helpful for me last night as it was a bit crazy getting pygit2 working properly w/ Helium and getting gitfs working w/ ssh URLs.
Note to anyone trying to do the same - make sure libssh2 is available on your system before compiling libgit2.
@tehmaspc Good catch. This is not explicitly referenced in the pygit2 installation instructions so it is easy to overlook. I added this to the walkthrough in #18247.