git 使用 access token
-
申请token
-
在
.git/config
文件中修改
修改前:
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "origin"] url = https://github.com/<username>/proj.git fetch = +refs/heads/*:refs/remotes/origin/*
修改后:
[user] name = <username> email = <email> [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "origin"] url = https://<username>:<access token>@github.com/<username>/proj.git fetch = +refs/heads/*:refs/remotes/origin/*
不需要换提交人的话,可以把[user]
去掉
使用token去clone私有仓库:
git clone https://oauth2:<token>@github.com/<username>/proj.git
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 字符编码:从基础到乱码解决
2020-09-25 ffmpeg concat设置绝对路径
2019-09-25 js bese64转化为blob使用FormData上传