window 上通过powershell 安装git
LINUX上安装源码安装
git源码文件下载地址:
git安装教程:https://www.cnblogs.com/fuzongle/p/12830572.html
github文件普通快速下载方法
git配置+代理
个人用户可在目录下直接创建.gitconfig文件
写入相关内容
[user]
name = gitname
email = gitemail
[core]
editor = emacs
[merge]
tool = vimdiff
[http]
proxy = 'http://用户名:密码@代理ip地址:端口号'
[https]
proxy = 'https://用户名:密码@代理ip地址:端口号'
解决github装包使用频率限制
- 操作下面步骤,就能找到github_token
- 打开网页(https://github.com/settings/tokens/new?scopes=repo,user,gist,workflow&description=DESCRIBE THE TOKEN'S USE CASE),翻到最底部,点击generate token,复制ghp_开头的字符串
library(gitcreds)
gitcreds_set()
-> Your current credentials for 'https://github.com':
protocol: https
host : github.com
username: PersonalAccessToken
password: <-- hidden -->
-> What would you like to do?
1: Abort update with error, and keep the existing credentials
2: Replace these credentials
3: See the password / token
输入2
Selection: 2
-> Removing current credentials...
? Enter new password or token: ghp_XXXXXXXXXXXXXXXXXXXXXXX(这里输入刚刚复制的字符串)
-> Adding new credentials...
-> Removing credentials from cache...
-> Done.
镜像配置参考:Git配置代理和取消的两种方法 - 掘金
解决github装包使用频率限制参考:推荐一个实用工具,顺便解决github装包使用频率限制和安装包的问题