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,可以点击查看详情

未完待续~~~

相关推荐
Cx330_FCQ7 小时前
Tmux使用
服务器·git·算法
dong_junshuai9 小时前
每天一个开源项目#51 Swift BLE 多设备状态同步实践
github
YuePeng9 小时前
别再让 AI 直接写 SQL 了:一个注解搞定十亿行数据的语义层
后端·github
英勇无比的消炎药9 小时前
TinyRobot v0.5.0 深度解读(四):CLI 脚手架——从零搭建 AI 应用的工程化实践
前端·vue.js·github
运维大师10 小时前
【K8S 运维实战】24-资源优化HPA与VPA
运维·kubernetes·github
Zeeland10 小时前
Agent 能完成一个任务,但它能持续追一个三个月的目标吗?
人工智能·github·openai
明航咨询-程老师12 小时前
增值电信业务经营许可证信息整理
github
逛逛GitHub13 小时前
找到 4 个花里胡哨的 GitHub 开源项目,推荐给你。
github
huameinan狮子14 小时前
3min手搓一个帮助文档,很合理吧!
前端·数据库·github
xxwl58514 小时前
Git 完整学习笔记:从入门到团队协作
笔记·git·学习