使用非 root 用户帐户安装 Git [英] Installing Git with non-root user account
问题描述
我已经在 GitHub 上设置了一个 Git 存储库,并在我的 Windows 机器上提交了一些更改.
I've already set up a Git repository on GitHub and committed a few changes from my Windows machine.
但明天我将不得不从一台运行 Ubuntu 且权限有限(即没有 sudo)的机器上在这个存储库中工作.
But tomorrow I'll have to work in this repository from a machine running Ubuntu with limited privilege (i.e. no sudo).
是否有适用于 Linux 的可移植 Git 版本?或者某些允许我仅为当前用户编译和安装 Git 的源?
Is there a portable version of Git for Linux? Or some source that allows me to compile and install Git only for the current user?
推荐答案
你可以下载 git 源码并做 ./configure --prefix=/home/user/myroot &&制作&&make install
将 git 安装到您的主目录,前提是您拥有构建工具.如果您没有安装 build-essential 软件包 (dpkg --list|grep build-essential
),您还需要将它们安装到您的主目录中.
You can download the git source and do ./configure --prefix=/home/user/myroot && make && make install
to install git to your home directory provided you have the build tools. If you don't have the build-essential package installed (dpkg --list|grep build-essential
), you will need to install those to your home directory as well.
这篇关于使用非 root 用户帐户安装 Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!