解决 `remote: You must use a personal access token with 'api' scope for Git over HTTP.`

简介: `git clone` 报错,解决 `remote: You must use a personal access token with 'api' scope for Git over HTTP.`

背景

在家远程办公的时候 git clone 报错:

remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'api' scope for Git over HTTP.

Access denied

解决方案

通过其提示的地址生成一个 Token:

remote: You can generate one at https://example.com/profile/personal_access_tokens

generate

然后通过命令行组合 Token 操作即可:

git clone https://oauth2:${PERSONAL_ACCESS_TOKEN}@example.com/example/example.git

git clone

目录
相关文章
|
5月前
|
网络协议 JavaScript 安全
第十一篇 前沿趋势与展望:深入探索GraphQL、RESTful API、WebSocket、SSE及QUIC与HTTP/3
第十一篇 前沿趋势与展望:深入探索GraphQL、RESTful API、WebSocket、SSE及QUIC与HTTP/3
|
2月前
|
API 开发工具 数据安全/隐私保护
【Azure Developer】Python 获取Micrisoft Graph API资源的Access Token, 并调用Microsoft Graph API servicePrincipals接口获取应用ID
【Azure Developer】Python 获取Micrisoft Graph API资源的Access Token, 并调用Microsoft Graph API servicePrincipals接口获取应用ID
|
2月前
|
Oracle Java 关系型数据库
JDK版本特性问题之在 JDK 11 中,HTTP Client API 的特点有哪些
JDK版本特性问题之在 JDK 11 中,HTTP Client API 的特点有哪些
|
3月前
|
消息中间件 API 数据库
在微服务架构中,每个服务通常都是一个独立运行、独立部署、独立扩展的组件,它们之间通过轻量级的通信机制(如HTTP/RESTful API、gRPC等)进行通信。
在微服务架构中,每个服务通常都是一个独立运行、独立部署、独立扩展的组件,它们之间通过轻量级的通信机制(如HTTP/RESTful API、gRPC等)进行通信。
|
4月前
|
存储 开发工具 git
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
|
5月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
69 0
|
3月前
|
缓存 JSON 算法
http【详解】状态码,方法,接口设计 —— RestfuI API,头部 —— headers,缓存
http【详解】状态码,方法,接口设计 —— RestfuI API,头部 —— headers,缓存
43 0
|
3月前
|
JavaScript 网络架构
vue-router.mjs:3252 TypeError: Cannot use ‘in‘ operator to search for ‘validateStatus‘ in http://loc
vue-router.mjs:3252 TypeError: Cannot use ‘in‘ operator to search for ‘validateStatus‘ in http://loc
|
5月前
|
开发工具 git
git怎么设置http代理服务器
git怎么设置http代理服务器
86 12
|
5月前
|
JSON 测试技术 API
Python的Api自动化测试使用HTTP客户端库发送请求
【4月更文挑战第18天】在Python中进行HTTP请求和API自动化测试有多个库可选:1) `requests`是最流行的选择,支持多种请求方法和内置JSON解析;2) `http.client`是标准库的一部分,适合需要低级别控制的用户;3) `urllib`提供URL操作,适用于复杂请求;4) `httpx`拥有类似`requests`的API,提供现代特性和异步支持。根据具体需求选择,如多数情况`requests`已足够。
65 3

热门文章

最新文章

下一篇
无影云桌面