Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Github account in Android Studio

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 to this new account. But I am not able to find any option to change the Github account in Android Studio. It keeps pushing from the previous account and hence results in this error:

remote: Permission to new_username/repository_name.git denied to old_username.

fatal: unable to access 'https://github.com/new_username/repository_name.git/': The requested URL returned error: 403

I am using Android Studio 1.2.2 on Windows OS.

like image 554
Nitish Srivastava Avatar asked Aug 13 '16 06:08

Nitish Srivastava


People also ask

How do I change my GitHub account?

In the upper-right corner of any page, click your profile photo, then click Settings. In the left sidebar, click Account. In the "Change username" section, click Change username.

How can I change from GitHub to Android Studio?

To update your project (to make a pull) with the latest changes from the remote repository (you should have already added the remote origin), navigate to VCS > Git > Pull. This will automatically update your Android Studio project with the most recent code from the remote repository.


1 Answers

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

enter image description here

like image 154
Nir Duan Avatar answered Oct 14 '22 04:10

Nir Duan