美文网首页
git版本控制工具安装和配置

git版本控制工具安装和配置

作者: alexbo | 来源:发表于2017-05-24 10:59 被阅读0次

    操作系统 mint17.2

    https://git-scm.com/book/zh/v1/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git

    1.先安装依赖

    sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev

    2.解压git

    tar -zxvf git-v2.8.0.tar.gz

    sudo make prefix=/opt/git all

    sudo make  prefix=/opt/git install

    添加环境变量

    sudo gedit /etc/profile

    export GIT_HOME=/opt/git

    export PATH=$JAVA_HOME/bin:$PATH:$MAVEN_HOME/bin:$GIT_HOME/bin

    立刻生效

    source /etc/profile

    用git把 Git 项目仓库克隆到本地,以便日后随时更新

    $ git clone git://git.kernel.org/pub/scm/git/git.git

    配置秘钥

    ssh-keygen -t rsa -C “alex@163.com”

     把私钥告诉本地系统

    ssh-add ~/.ssh/id_rsa

    复制公钥到码云

    cat id_rsa.pub

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSdUpkDQsaonNrXp+dngXYLIeUmorGwq1YneTWGfpdxyFVQD33unR+gWtP8yWDei0WrICvkQeq49rWkhw2GfJYgazqLq5CFRBjPoFGLPz1K1X6XCeiiWWKLpZKkafZoP8rwVXIIni6Gye1NrBRXtYqkH6WyK90rBHMl5nsiJPAOpXW8YRIzUMt1G2tyMnA29Bdg2bHr8RporIBsM7nn5P1wsYL3JfdFR3SYbAfk+ShuZPw/FzyJe0cZ1YPZw6ZnI0KaLwK6HdwGzcC7zo0E3mh7FqPL+01g/PK+AtVsOlpDFoWK5ezwaDEAUvfIbnIFKvgMx17z6E0A49nNSFk79Bj study

    相关文章

      网友评论

          本文标题:git版本控制工具安装和配置

          本文链接:https://www.haomeiwen.com/subject/dymnxxtx.html