Git推送到GitHub仓库遇到的问题

问题一

问题:

GitHub 从 2021 年 8 月 13 日起,就不再支持使用账号密码进行 Git 操作了,必须使用个人访问令牌(Personal Access Token, PAT)来代替

类似报错如下:

19:43:23.011: first_item git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/master:refs/heads/master --set-upstream

remote: Invalid username or token. Password authentication is not supported for Git operations.

fatal: Authentication failed for 'https://github.com/jige4836/Pet-System.git/'

Token生成步骤

1.点击头像

2.选择Settings

进入Settings后,滑动左侧边栏到底部,点击Developer settings

1.确保进入Developer settings

2.点击Personal access tokens

注:操作过程中,需要进行验证,可以使用GitHub手机App验证

1.点击tokens(classis)

2.点击Generate new token

3.选择第二个Generate new token(classis)

1.名称Note

2.有效期限Expiration(可以以月为单位,但是别设置太长时间)

3.仓库权限repo(建议授予仓库所有权限)

提交后就可以看到tokens,复制后可以直接当密码用

退出后,就会显示token,可以点击查看详情

未完待续~~~

相关推荐
wflynn6 小时前
GitHub 今日推荐|univer:可嵌入 Web 应用的开源 Office 引擎
typescript·开源·github·doc·collaboration·board
dong_junshuai7 小时前
每天一个开源项目#163 Ghost Downloader:分块下载为何不用合并
github
网易云信7 小时前
AI 写 IM 集成总用错 API?用云信 AI Skills 把文档接进开发流程
github
猛码象限8 小时前
【GitHub 周报】换血八成,注意力从造 Agent 转向管 Agent
github·业界资讯
逛逛GitHub8 小时前
很多人想把《GTA 6》移植到 PC 上,这 4 个 GitHub 项目在努力。
github
逛逛GitHub8 小时前
谷歌 Chrome 团队出手了,GitHub 上获 1W 的 Star 了。
github
秋千易13 小时前
评测通过率 0.5,阈值一改就绿:跑分器先写三种退出码
github
答案answer13 小时前
从0-1在高德地图上搭建一个智慧仓库数字孪生场景
github
徐小夕14 小时前
折腾一年,我们正式发布 JitOffice:一款跑在浏览器里的 AI Office
前端·vue.js·github
zhensherlock1 天前
Protocol Launcher 系列:CodeHub 移动端 GitHub 协作利器
前端·javascript·typescript·node.js·自动化·github·js