skip to Main Content

I want to share my Android Studio project on Github but when I click to share, it appear to

http://127.0.0.1:63342/api/github/oauth/authorization_code?code=14c943d3435fe66a54f7

and it ask for username and password. I try to log in using my Github username and password but failed.

*Just started programming for 2 weeks

5

Answers


  1. In case you’ve entered your GitHub access credentials into that – apparently SSL tunnel – which may lead somewhere very else than to https://api.github.com – your GitHub account likely had been compromised by a phishing attack …urgently login on the web and change your account password first, then regenerate all personal access tokens, replace all the SSH keys, check if anything else changed. Also check your local PC for malware infection, because to me this seems to be what you’re actually dealing with.

    For example… any rouge Gradle plugin can patch local config files, alike the one from that GitHub login dialog, or locally install a SSL tunnel as backdoor (these may work both ways). Then some clueless guy comes around, does not understand where he just entered his access credentials, complains that it is not working and takes to the internet, in order to complain some more about it.

    140.82.121.4 would be the correct IP address… and it’s all over the news (despite 2020).

    Also see: OAuth 2.0 authentication vulnerabilities …in order to back up my claim.

    Login or Signup to reply.
  2. I try to log in using my Github username and password but failed

    Apparently, you are using an old version of git on your system. Because, if your git version was up to date it would pop out a window with username and personal access token.

    First of all, update your git to the last version. Second, create a personal access token. See this Support for password authentication was removed. Please use a personal access token instead

    Login or Signup to reply.
  3. This is not a phishing attack. See thread here:
    Intellij Android Studio opens localhost page to login on github

    Intellij support says that this is an Android Studio bug and recommends using a token as a workaround.

    Generating the token

    Log in to you GitHub account and navigate to Settings > Developer Settings > Personal Access Tokens

    Click "Generate new token"

    Add a note so you know this token is for Android Studio and then check the following boxes: repo, read:org, and gist

    Click "Generate token"

    Now copy the generated token and return to Android Studio.

    Log In With Token From Android Studio

    In Android Studio, Navigate to File > Settings > Version Control > GitHub

    Select the ‘+’ and then choose "Log In with token".

    Paste the copied token and click "Add Account"

    Login or Signup to reply.
  4. This is a bug within Android Studio. It still exists in the (as of today) current version 2020.3.1.

    Bugtracker describing this issue: https://issuetracker.google.com/issues/174787515

    As a work-around you can create a token in Github and use that to log in.
    https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

    The token must have the repo, the gist and the read:org scopes enabled in your account permissions.

    Login or Signup to reply.
  5. I solved this problem following these steps:

    1. Use SSH (forget https) (E.g., don’t use https url for cloning)
    2. Use Personal Access Token (PAT) (forget username/password)

    (e.g., Settings > Developer Settings > Personal Access Token)

    1. Update git to latest version (e.g., 2.35.1) //I think this is important
    2. In Github, Uncheck Settings > Developer Settings > Keep my email addresses private

    Conclusion: You add Personal Access token in Github. Then from any IDE (e.g., Android Studio, IntelliJ IDEA etc.) you can add remote using ssh (e.g., name: origin, URL: [email protected]:your_github_username/your_git_repo.git. That’s it

    If not already done,

    1. Configure git global username and email

      git config –global user.name "your_username" && git config –global user.email "your_email"

    If in windows, you can add windows credentials for your user, control panel > users > manage your credential > Windows Credentials > Add a generic credential >

    Internet address will be git:https://github.com and you need to type
    in your username and password will be your GitHub Personal Access
    Token => Click Ok and you are done

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search