Imported Upstream version 2.4.0
[scm/test.git] / INSTALLING.md
1 # Installing on Linux using packagecloud
2
3 [packagecloud](https://packagecloud.io) hosts [`git-lfs` packages](https://packagecloud.io/github/git-lfs) for popular Linux distributions with Apt/deb and Yum/rpm based package-managers.  Installing from packagecloud is reasonably straightforward and involves:
4
5 * Adding the packagecloud repo that best matches your Linux distribution and version, then
6 * Running your package-manager's install command
7
8 ## Adding the packagecloud repository
9
10 packagecloud provides scripts to automate the process of configuring the package repository on your system, importing signing-keys etc.  These scripts must be run sudo root, and you should review them first.  The scripts are:
11
12 * Apt/deb repositories: https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh
13 * Yum/rpm repositories: https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh
14
15 The scripts check your Linux distribution and version, and use those parameters to create the best repository URL.  If you are running one of the distributions listed for the latest version of Git LFS listed at [packagecloud](https://packagecloud.io/github/git-lfs) e.g `debian/jessie`, `el/7`, you can run the script without parameters:
16
17 Apt/deb repos:
18 `curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash`
19
20 Yum/rpm repos:
21 `curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash`
22
23 If you are running a distribution which does not match exactly a repository uploaded for Git LFS, but for which there is a repository for a compatible upstream distribution, you can either run the script with some additional parameters, or run it and then manually-correct the resulting repository URLs.  See [#1074](https://github.com/git-lfs/git-lfs/issues/1074) for details.
24
25 If you are running LinuxMint 17.1 Rebecca, which is downstream of Ubuntu Trusty and Debian Jessie, you can run:
26
27 `curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | os=debian dist=jessie sudo -E sudo bash`
28
29 The `os` and `dist` variables passed-in will override what would be detected for your system and force the selection of the upstream distribution's repository.
30
31 ## Installing packages
32
33 With the packagecloud repository configured for your system, you can install Git LFS:
34
35 * Apt/deb: `sudo apt-get install git-lfs`
36 * Yum/rpm: `sudo yum install git-lfs`
37
38 ## A note about proxies
39
40 Several of the commands above assume internet access and use `sudo`. If your host is behind a proxy-server that is required for internet access, you may depend on environment-variables `http_proxy` or `https_proxy` being set, and these might not survive the switch to root with `sudo`, which resets environment by-default.  To get around this, you can run `sudo` with the `-E` switch, `sudo -E ...`, which retains environment variables.