Unable to Access Github 403 Error: Permission Denied
Unable to Access Github 403 Error: Permission Denied
我是 Git / Github 的新手,所以请原谅我的困惑!
难点在于:我刚刚对本地存储库进行了更改,并想推送到 Github 上的源(特别是 gh-pages)。以前,我一直在使用另一个 Github 帐户,所以我更改了我的 'user.name' & 'user.email' 以匹配我现在要推送到的帐户。
截至目前,我收到 403 错误并且权限被拒绝。
我错过了哪一步?离开我发现的其他答案,似乎改变我的 user.name & user.email 应该可以解决问题。 git 配置中是否有我需要更改才能使其正常工作的设置?
欢迎任何帮助、建议或建设性的批评,我只是渴望让它工作!
检查您的 git 安装是否使用 OSX Keychain 通过 运行 git config --global credential.helper
存储凭据。如果那个 returns osxkeychain
那么它就是。
来自https://help.github.com/articles/updating-credentials-from-the-osx-keychain/:
You'll need to update your saved username and password in the git-credential-osxkeychain helper if you change your password or username on GitHub.
- In Finder, search for the Keychain Access app.
- In Keychain Access, search for github.com.
- GitHub Password Entry in KeychainFind the "internet password" entry for github.com.
- Edit or delete the entry accordingly.
您可能需要检查的另一件事是,您是否正在为您推送的 github 帐户使用 2 因素身份验证?如果你是那么你可能需要来自 here:
When 2FA is enabled
If you have two-factor authentication enabled, you must create a
personal access token to use as a password when authenticating to
GitHub on the command line with HTTPS URLs.
For example, when you access a repository using Git on the command
line using commands like git clone, git fetch, git pull or git push
with HTTPS URLs, you must provide your GitHub username and your
personal access token when prompted for a username and password.
For more information on setting up two-factor authentication, see
"Adding security to your account with two-factor authentication."
只需将Keychain access中的github.com删除即可。你会很高兴的。
我是 Git / Github 的新手,所以请原谅我的困惑!
难点在于:我刚刚对本地存储库进行了更改,并想推送到 Github 上的源(特别是 gh-pages)。以前,我一直在使用另一个 Github 帐户,所以我更改了我的 'user.name' & 'user.email' 以匹配我现在要推送到的帐户。
截至目前,我收到 403 错误并且权限被拒绝。
我错过了哪一步?离开我发现的其他答案,似乎改变我的 user.name & user.email 应该可以解决问题。 git 配置中是否有我需要更改才能使其正常工作的设置?
欢迎任何帮助、建议或建设性的批评,我只是渴望让它工作!
检查您的 git 安装是否使用 OSX Keychain 通过 运行 git config --global credential.helper
存储凭据。如果那个 returns osxkeychain
那么它就是。
来自https://help.github.com/articles/updating-credentials-from-the-osx-keychain/:
You'll need to update your saved username and password in the git-credential-osxkeychain helper if you change your password or username on GitHub.
- In Finder, search for the Keychain Access app.
- In Keychain Access, search for github.com.
- GitHub Password Entry in KeychainFind the "internet password" entry for github.com.
- Edit or delete the entry accordingly.
您可能需要检查的另一件事是,您是否正在为您推送的 github 帐户使用 2 因素身份验证?如果你是那么你可能需要来自 here:
When 2FA is enabled
If you have two-factor authentication enabled, you must create a personal access token to use as a password when authenticating to GitHub on the command line with HTTPS URLs.
For example, when you access a repository using Git on the command line using commands like git clone, git fetch, git pull or git push with HTTPS URLs, you must provide your GitHub username and your personal access token when prompted for a username and password.
For more information on setting up two-factor authentication, see "Adding security to your account with two-factor authentication."
只需将Keychain access中的github.com删除即可。你会很高兴的。