git - 致命:在我创建并添加个人访问令牌后找不到存储库
问题描述
我正在开发 ubuntu 18
我创建了一个新的 git 存储库。
我添加了一些文件并创建了一个提交。
我尝试使用 my 推送最后一次提交,
username
并git password
收到以下错误消息:远程:2021 年 8 月 13 日删除了对密码身份验证的支持。请改用个人访问令牌
我按照以下说明进行操作:删除了对密码身份验证的支持。请改用个人访问令牌:
我生成了一个新令牌
我配置了我的
username
和email
现在我尝试使用 my 推送最后一次提交,
username
并将创建的令牌用作password
. 现在我得到了一个新错误:远程:未找到存储库
- 我错过了什么?
- 如何推送到我的 git 存储库?
解决方案
试试这个命令
将字段替换为
- your-personal-access-token 与您生成的人员访问令牌
- 你的用户名和你的 github 用户名
- your-repo 与您要推送的仓库的名称
检查您是否提供了对您的个人访问令牌的回购访问权限
git remote set-url origin https://your-personel-access-token@github.com/your-username/your-repo.git
推荐阅读
- javascript - 如何将每种颜色应用于每个数据集
- corda - 如何在corda中将不是金钱的资产从一方转移到另一方
- javascript - 当我添加绝对位置时,UL 背景不显示
- arrays - 尝试区分“...”时出错。只允许使用数组和可迭代对象。(使用 switchMap)
- csv - Hive 可以处理 CSV 文件中的多个双引号吗?
- html - 如何将sql查询结果转换为带有属性的html标签
- logging - openAM 认证日志
- https - NodeMCU 强制门户网站服务器响应 HTTP,但不响应 HTTPS
- javascript - 当鼠标具有特定类时更改 div 的背景图像
- ios - 目前如何在 Swift 中进行观察?