如何在服务器上克隆、pull、push GitHub私有项目

诸神缄默不语-个人CSDN博文目录

情况是这样的,我直接用git clone命令后,会提示让我输入GitHub账号密码,我输入后它还是显示克隆失败,并显示:

复制代码
Cloning into 'folder_name'...
Username for 'https://github.com': user_name
Password for 'https://user_name@github.com': 
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/user_name/folder_name.git/'

也就是说现在不支持仅用账号密码来克隆GitHub项目了,解决方案是在输入密码时改为输入personal access token。获取personal access token的方式:

  1. 进入https://github.com/settings/personal-access-tokens/new
  2. 创建personal access token:选择项目范围接下来选择操作范围,我就选了能commit、pull request之类的功能,因为感觉也不需要别的功能。
  3. 生成personal access token后点击这个图标即可复制:
相关推荐
Bruce_Liuxiaowei2 分钟前
县级融媒体中心备份与恢复策略(精简版3-2-1架构)
运维·windows·网络安全·媒体
Lovyk31 分钟前
DNS 服务器
运维·服务器
望获linux32 分钟前
【实时Linux实战系列】实时数据流处理框架分析
linux·运维·前端·数据库·chrome·操作系统·wpf
Forever Nore2 小时前
Nginx 学习
运维·学习·nginx
泽02023 小时前
Linux基本指令(一)
linux·运维·服务器
AOwhisky3 小时前
板块三章节3——NFS 服务器
运维·服务器·php
₯㎕星空&繁华4 小时前
接口自动化-pytest
运维·经验分享·笔记·自动化·pytest·接口
从零开始的ops生活4 小时前
【Day 18】Linux-DNS解析
linux·运维·服务器
Dontla5 小时前
Linux怎么查看时区信息?(Linux时区)(tzselect)
linux·运维·服务器