Change Github account in Android Studio

后端 未结 11 575
我在风中等你
我在风中等你 2021-02-05 02:37

I have used one Github account to push an android project to Github from Android Studio. Now I have created another account on Github and want to push my another android project

相关标签:
11条回答
  • 2021-02-05 02:54

    Perhaps not the answer you are wanting, but you can probably solve this by finding out where the project code is stored by android studio and changing the git remote there.

    For example, if you want to change where the main repository you push to, enter this in the command line when inside the project directory: git remote set-url origin <new-url-from-github>

    0 讨论(0)
  • 2021-02-05 02:55

    I had the same problem and had solved it.
    With current Android Studio 3.5 we can add several github account

    with several github account added we can select one for the default for specific project.

    or

    change the git username and email:

    • git config user.name "your username"
    • git config user.email "youremail.com"


    add --global if you want change for global config

    0 讨论(0)
  • 2021-02-05 02:57

    Go to:
    Setting --> Version Control --> GitHub --> Change you username.

    0 讨论(0)
  • 2021-02-05 03:02

    In my case none of working. This way works for me.

    Steps:

    1. Open Settings of Android studio
    2. Select Appearance & Behavior
    3. Select System Settings
    4. Select Passwords
    5. Select Do not remember passwords
    6. Click on OK

    Now its time to Push your source code to Git, Android studio would ask for new username and its password.

    Reference screenshot.

    Done

    0 讨论(0)
  • 2021-02-05 03:08

    Step 1

    Change file config in directory .git that located in your project folder

    Step 2

    In terminal @ current project, type:
    git credential-manager uninstall

    Cheers~

    0 讨论(0)
  • 2021-02-05 03:08

    I solved mine with re-installing,

    git credential-manager uninstall then git credential-manager install push to repo git push --set-upstream origin master this will ask for authentication, authenticate and BoooMMMM!!!

    0 讨论(0)
提交回复
热议问题