Git错误:“对afriedman1991/PS_Change_Log_Notifier.git的权限被拒绝进行临时基准测试"; [英] Git error: "Permission to afriedman1991/PS_Change_Log_Notifier.git denied to scratchbenchmark"

查看:60
本文介绍了Git错误:“对afriedman1991/PS_Change_Log_Notifier.git的权限被拒绝进行临时基准测试";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个新的git存储库,以应对由潜在雇主发送给我的编码挑战.我正在使用一台新计算机(Mac OSX);但是,当我尝试使用HTTPS从命令行推送现有存储库时,出现错误消息:

I'm setting up a new git repository for a coding challenge that was sent to me by a prospective employer. I'm using a new computer (Mac OSX); however, when I try to push my existing repository from the command line using HTTPS, I get an error message saying:

remote: Permission to afriedman1991/PS_Change_Log_Notifier.git denied to scratchbenchmark.
fatal: unable to access 'https://github.com/afriedman1991/PS_Change_Log_Notifier.git/': The requested URL returned error: 403

Benchmark是我曾经工作过的公司,它使用SSH来管理他们的项目.由于某些原因,git认为即使我的来源设置为:

Benchmark was the company I used to work for, who used SSH to manage their project. For some reason, git thinks I'm still trying to push to their repository, even though my origin is set to:

origin  https://github.com/afriedman1991/PS_Change_Log_Notifier.git (fetch)
origin  https://github.com/afriedman1991/PS_Change_Log_Notifier.git (push)

一段时间以来,我一直在试图找出解决方法,但似乎找不到有效的解决方案.有人可以帮忙吗?

I've been trying to figure out how to fix this for a while now, but can't seem to find any solutions that work. Can anyone help?

推荐答案

检查您的凭据助手是否缓存了错误的凭据

Check if your credential helper has cached the wrong credentials

git config credential.helper

如果是经理",则可以"在Windows的Git Bash控制台中退出".

If it is "manager", you can "sign out in the Git Bash console in Windows".

git credential-manager reject https://github.com

在Mac上,对于osxkeychain,请参阅"更新OSX钥匙串中的凭据"

On Mac, for osxkeychain, see "Updating credentials from the OSX Keychain"

git credential-osxkeychain erase https://github.com

然后重试:它将提示输入用户GitHub用户名/密码.

Then try again: it will prompt for user GitHub username/password.

这篇关于Git错误:“对afriedman1991/PS_Change_Log_Notifier.git的权限被拒绝进行临时基准测试";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆