博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

git 仓库相关命令

Posted on 2018-03-30 15:06  alex_hrg  阅读(130)  评论(0编辑  收藏  举报

git配置文件 : .git/config

  配置存储远程连接用户信息   

[credential]        
    helper = store   
View Code

  配置www用户下默认git pull账号和密码,这样每一个新加的项目都不用输入账号

vim ~/.gitconfig;    chmod 600 ~/.gitconfig

[credential]
    helper = store

vim ~/.git-credentials;  chmod 600 ~/.git-credentials

https://www:123@gitlab.test.com

  

配置ssh远程连接,并加端口号

[remote "origin"]
        url = ssh://git@github.com:5209/root/Tools.git
View Code

  配置私有仓库关闭ssl认证

    git config --global http.sslVerify "false" 

  配置用户信息

     git config --global user.name "alex huang"

     git config --global user.email "alex@root.com"