栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

解决You‘ve successfully authenticated, but GitHub does not provide shell access.

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

解决You‘ve successfully authenticated, but GitHub does not provide shell access.

解决You've successfully authenticated, but GitHub does not provide shell access.
  • 问题
  • 原因&解决
  • 后续

问题

在git push 的时候提示输入账号密码。但我在另一个项目配置过 ssh 免密的。并且现在 git 也不允许 http 连接,所以提供账号密码也没办法 push。

$ git push -u origin main
Username for 'https://github.com': xx@qq.comxx
Password for 'https://xx@qq.com@github.com': 
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/balala8/N0va_for_mac.git/'
原因&解决

虽然是用 git 命令push,但本质上仍然是 https,所以不允许提交。
使用 git remote -v 查看现在的远程 url 地址。

git remote -v
origin	https://github.com/balala8/N0va_for_mac.git (fetch)
origin	https://github.com/balala8/N0va_for_mac.git (push)

使用下面的改 url 链接。

git remote set-url origin  git@github.com:balala8/N0va_for_mac.git   

再次查看

git remote -v                                                     
origin	git@github.com:balala8/N0va_for_mac.git (fetch)
origin	git@github.com:balala8/N0va_for_mac.git (push)

已经改为 ssh 了。现在可以正常 push 了。

后续

使用ssh测试链接。

ssh git@github.com  

会发现

You've successfully authenticated, but GitHub does not provide shell access.

这句话其实一直存在,它只是想告诉你,github 不允许 shell 交互。仅此而已。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/838166.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号