Github Mirror API Sign-In will be deprecated this summer #4806

Closed
opened 2025-11-02 06:03:26 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @djotaku on GitHub (Feb 6, 2020).

  • Gitea version (or commit ref): 1.12.0+dev-71-gd171cd41b built with GNU Make 4.2.1, go1.13.6
  • Git version: 2.24.1
  • Operating system: Docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • [x ] SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Not sure I want to enter my creds there

  • Log gist: No associated logs

Description

Yesterday created a mirror of a repo I have on Github. When I went to do that in gitea it prompted me for my Github username and password. Everything worked fine and it was mirrored. Then I got the following email from Github:

"
Hi (my username),

You recently used a password to access an endpoint through the GitHub API using go-github. On July 1st, 2020, basic authentication using password to this endpoint will no longer work:

https://api.github.com/repositories/(my repository)

We recommend using a personal access token (PAT) with the appropriate scope to access this endpoint instead. Visit https://github.com/settings/tokens for more information.
"
So I think that needs to be supported rather than username password.

Screenshots

Originally created by @djotaku on GitHub (Feb 6, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.12.0+dev-71-gd171cd41b built with GNU Make 4.2.1, go1.13.6 - Git version: 2.24.1 - Operating system: Docker - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant Not sure I want to enter my creds there - Log gist: No associated logs ## Description Yesterday created a mirror of a repo I have on Github. When I went to do that in gitea it prompted me for my Github username and password. Everything worked fine and it was mirrored. Then I got the following email from Github: " Hi (my username), You recently used a password to access an endpoint through the GitHub API using go-github. On July 1st, 2020, basic authentication using password to this endpoint will no longer work: https://api.github.com/repositories/(my repository) We recommend using a personal access token (PAT) with the appropriate scope to access this endpoint instead. Visit https://github.com/settings/tokens for more information. " So I think that needs to be supported rather than username password. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/miscellaneoustype/docsissue/stale labels 2025-11-02 06:03:26 -06:00
Author
Owner

@guillep2k commented on GitHub (Feb 7, 2020):

Thanks for the heads-up!

@guillep2k commented on GitHub (Feb 7, 2020): Thanks for the heads-up!
Author
Owner

@stale[bot] commented on GitHub (Apr 7, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 7, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@djotaku commented on GitHub (Apr 7, 2020):

Got a thanks for the head's up, bu don't see any comments that this was handled, so I'm doing what the stale-bot said and adding a comment

@djotaku commented on GitHub (Apr 7, 2020): Got a thanks for the head's up, bu don't see any comments that this was handled, so I'm doing what the stale-bot said and adding a comment
Author
Owner

@guillep2k commented on GitHub (Apr 8, 2020):

Sorry, I've set this to be solved by 1.12.0 so we don't miss it.

@guillep2k commented on GitHub (Apr 8, 2020): Sorry, I've set this to be solved by 1.12.0 so we don't miss it.
Author
Owner

@djotaku commented on GitHub (Apr 8, 2020):

Yeah, no worries. Just following stale-bot's instructions.

@djotaku commented on GitHub (Apr 8, 2020): Yeah, no worries. Just following stale-bot's instructions.
Author
Owner

@lunny commented on GitHub (May 2, 2020):

@djotaku @guillep2k Gitea has supportted put your token in the username box to migrate repository. So we only need to put some notice on the UI that If you are migrating repository from github, Username/password will not be supported by github. You could still put your personal access token on username box to migrate your repository from github.

@lunny commented on GitHub (May 2, 2020): @djotaku @guillep2k Gitea has supportted put your token in the username box to migrate repository. So we only need to put some notice on the UI that `If you are migrating repository from github, Username/password will not be supported by github. You could still put your personal access token on username box to migrate your repository from github.`
Author
Owner

@DefinitelyADev commented on GitHub (May 2, 2020):

@djotaku @guillep2k Gitea has supportted put your token in the username box to migrate repository. So we only need to put some notice on the UI that If you are migrating repository from github, Username/password will not be supported by github. You could still put your personal access token on username box to migrate your repository from github.

@lunny Wouldn't it be better if the Username/Password functionality got replaced altogether by Token authentication?
e.g. Remove the username and password fields and add a Token field. Maybe add check if the URL contains github.com or try to resolve it when the user inputs it and if it is a Github URL replace the authentication parameters from Username and Password to Token.

@DefinitelyADev commented on GitHub (May 2, 2020): > @djotaku @guillep2k Gitea has supportted put your token in the username box to migrate repository. So we only need to put some notice on the UI that `If you are migrating repository from github, Username/password will not be supported by github. You could still put your personal access token on username box to migrate your repository from github.` @lunny Wouldn't it be better if the Username/Password functionality got replaced altogether by Token authentication? e.g. ~~Remove the username and password fields and add a Token field.~~ Maybe add check if the URL contains github.com or try to resolve it when the user inputs it and if it is a Github URL replace the authentication parameters from Username and Password to Token.
Author
Owner

@stale[bot] commented on GitHub (Jul 1, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jul 1, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@xet7 commented on GitHub (Jul 13, 2020):

Username / Password field text should be replaced by Token field?

@xet7 commented on GitHub (Jul 13, 2020): Username / Password field text should be replaced by Token field?
Author
Owner

@stale[bot] commented on GitHub (Sep 11, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Sep 11, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Sep 11, 2020):

Now we only support token. So I close this and feel free to reopen it.

@lunny commented on GitHub (Sep 11, 2020): Now we only support token. So I close this and feel free to reopen it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4806