Answer a question

I am part of an organization that uses SSO in Github. I don't have problem to access the repository through the web, it redirects me to SSO login and that's all.

The problem started when I logged-in first to my personal repository on GitHub through Git-Bash, I did some changes and then I wanted to do changes in a repository from my organization. When I run the below command, it wrote me that I need to re-authorize the OAuth Application, but I don't understand how:

$ git push --delete origin v0.1.3
remote: The `<my_company>' organization has enabled or enforced SAML SSO. To access
remote: this repository, you must re-authorize the OAuth Application `Git Credential Manager`.
fatal: unable to access 'https://github.com/<my_company>/myproj.git/': The requested URL returned error: 403

How can I re-authorize the login?

I tried to re-open Git-Bash but it wrote me the same error.

Answers

My company just enabled SSO for my Github Org overnight so was getting the same error running git pull. I fixed this with the following steps.

  1. Open Credential Manager in Windows and delete the existing credential for github.com
  2. Re-initialise the cred manager in git bash: git config --global credential.helper manager-core
  3. Re-run git pull and follow the pop-up instructions to authenticate in a browser (which happened automatically for me with SSO).

After those steps git commands worked for me again.

Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐