cr0w

-High end color matching

导航

linux使用git备忘

环境配置:

安装git apt install git

生成ssh key ,命令 ssh-kengen -t rsa -C "email@email.com"

在github打开配置 添加ssh keys(用生成出来的*.pub)linux->cat *.pub

测试ssh key是否配置成功 命令:ssh -T git@github.com 

*注 如失败可能需要配置linux的ssh agent 命令:

  ssh-agent -s

  ssh-add ~/.ssh/id_rsa 这儿是将生成出来的key添加到ssh agent里

* 还有可能是注册的邮箱不一致 查看配置 命令:git config --global --list 

git config --global user.name "your name"

git config --global user.email "your email"

 

github clone 需要代理 so 

配置git代理

git config --global http.proxy http://127.0.0.1:port

git config --global https.proxy https://127.0.0.1:port

取消配置代理

git config --global --unset http.proxy
git config --global --unset https.proxy

 

posted on 2021-05-17 09:07  cr0w  阅读(41)  评论(0编辑  收藏  举报