您应该通过添加以下行来编辑sources.list:
deb http://ftp.ca.debian.org/debian/ jessie main contrib
然后升级您的软件包并安装git:
apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get -f install
apt-get install git
编辑
下面的包git,liberror-perl并且[rsync] 3可以从下载main回购,因为你没有main在你的回购sources.list则无法安装git和它的依赖。
您sources.list应该是(带non-free包装):
deb http://ftp.ca.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.ca.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.ca.debian.org/debian/ jessie-backports main contrib non-free
在debian Stretch上,您/etc/apt/sources.list至少应该是:
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/ stretch/updates main
deb http://deb.debian.org/debian/ stretch-updates main
sudo apt -f install或sudo aptitude -f。