如何在服务器上克隆、pull、push GitHub私有项目 诸神缄默不语-个人技术博文与视频目录我是在本地电脑上修改、开发应用代码然后想推送到GitHub私有仓库并在服务器上直接克隆、编辑、更新对应的项目。现在GitHub搞2FA认证了我是直接用谷歌浏览器存的Passkey。这块我就不介绍了。总之本文就只讲personal access token的事我执行git clone命令后会提示让我输入GitHub账号密码。以前是可以直接输入账号密码的但是现在我输入账密后它还是显示克隆失败并显示2024年12月的效果Cloning into folder_name... Username for https://github.com: user_name Password for https://user_namegithub.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/2026年8月的效果remote: Invalid username or token. Password authentication is not supported for Git operations. fatal: Authentication failed for https://github.com/user_name/folder_name.git/也就是说现在不支持仅用账号密码来克隆GitHub项目了解决方案是在输入密码时改为输入personal access token。获取personal access token的方式进入https://github.com/settings/personal-access-tokens现在personal access token分成fine-grained和classic两种。效果差不多我就只介绍fine-grained token了。创建token指定token名称会在token列表中看到方便明确哪个token是拿来干什么事的、token描述、过期时间、repository范围和权限想要正常执行clone、pull等操作就得给代码读写权限。这个resource owner我也不知道除了自己还能选谁我就是给自己用的所以还没有仔细研究。生成personal access token后点击复制即可注意这个token只会生成一次在token详情界面中也不能复制在token详情界面中可以续期。

相关新闻

最新新闻

douyin-downloader:抖音批量下载工具,1 个配置文件覆盖 7 类内容

douyin-downloader:抖音批量下载工具,1 个配置文件覆盖 7 类内容

douyin-downloader:抖音批量下载工具,1 个配置文件覆盖 7 类内容 【免费下载链接】douyin-downloader A practical Douyin downloader for both single-item and profile batch downloads, with progress display, retries, SQLite deduplication, and b…

2026/8/23 14:51:32
FlyFish 数据可视化大屏如何快速上手:从部署到拖拽出图

FlyFish 数据可视化大屏如何快速上手:从部署到拖拽出图

FlyFish 数据可视化大屏如何快速上手:从部署到拖拽出图 【免费下载链接】FlyFish FlyFish is a data visualization coding platform. We can create a data model quickly in a simple way, and quickly generate a set of data visualization solutions by draggi…

2026/8/23 14:51:32
NCM 转 MP3 不求人:ncmdump 4 步上手教程,新手一次跑通

NCM 转 MP3 不求人:ncmdump 4 步上手教程,新手一次跑通

NCM 转 MP3 不求人:ncmdump 4 步上手教程,新手一次跑通 【免费下载链接】ncmdump 项目地址: https://gitcode.com/gh_mirrors/ncmd/ncmdump 想把下载的老歌剪进视频里,剪辑软件却提示不识别 .ncm 文件——它是网易云音乐的专用加密格…

2026/8/23 14:51:32
LayerDivider 图像分层上手:一张插画拆出可编辑的分层PSD

LayerDivider 图像分层上手:一张插画拆出可编辑的分层PSD

LayerDivider 图像分层上手:一张插画拆出可编辑的分层PSD 【免费下载链接】layerdivider A tool to divide a single illustration into a layered structure. 项目地址: https://gitcode.com/gh_mirrors/la/layerdivider 你有没有过这种麻烦:插画…

2026/8/23 14:51:32
WebOne 实战:用 Edit Sets 规则修复现代网站的 10 个高效技巧

WebOne 实战:用 Edit Sets 规则修复现代网站的 10 个高效技巧

WebOne 实战:用 Edit Sets 规则修复现代网站的 10 个高效技巧 【免费下载链接】webone HTTP 1.x proxy that makes old web browsers usable again in the Web 2.0 world. 项目地址: https://gitcode.com/gh_mirrors/we/webone WebOne 是一款开源的 HTTP 1.x 代理服务器…

2026/8/23 14:51:32
丢进去一句话,3分钟出片:零基础AI视频生成工具Auto-Video-Generator实操

丢进去一句话,3分钟出片:零基础AI视频生成工具Auto-Video-Generator实操

丢进去一句话,3分钟出片:零基础AI视频生成工具Auto-Video-Generator实操 【免费下载链接】auto-video-generateor 自动视频生成器,给定主题,自动生成解说视频。用户输入主题文字,系统调用大语言模型生成故事或解说的文…

2026/8/23 14:46:31