当我这样做
remote = f"https://{username}:{password}@github.com/user/repo"
git.Repo.clone_from(remote, 'repo')
我可以使用我的个人凭据克隆存储库。
但是如果我尝试使用应用凭据
remote = f"https://x-access-token:{token}@github.com/user/repo.git"
git.Repo.clone_from(remote, 'repo')
我明白
<块引用>远程:无效的用户名或密码。致命:身份验证失败 'https://github.com/user/repo'
我已安装该应用程序并将其添加到存储库集成中。它具有读取和写入的内容权限。
我使用客户端密钥作为令牌。