git免密拉取代码

chihqiang chihqiang 2024-04-21 约 1 分钟 286 字

方式1: 通过公钥和私钥进行ssh拉去代码

生成公钥和私钥命令

1
ssh-keygen

拉去代码

1
git clone git@github.com:username/repository.git

方式1: 配置.netrc

来源: https://go.dev/doc/faq#git_https

在liunx或mac系统下

1
echo machine github.com login 账号 password 密码 > ~/.netrc

拉去代码

1
git clone https://github.com/username/repository.git
分享: Twitter Facebook
chihqiang

chihqiang

代码与生活的点滴记录