remote with selected name already exist Android studio , git hub error - android

I'm getting this GitHub error in android studio whenever I'm creating a new repository , And I'm not having any GitHub repo. of the same name.

goto Terminal in android studio and type below command –
git remote rm github

Open to Android Studio > VCS > Git > Remotes Delete all the addresses that will appear in this section. The problem will solve.

Android studio->Git->Manage Remotes...
And delet all from there with -

Tried it.....
Step1. Git-2.11.0-64-bit.exe Setup.
Step2: Git Bash -> git config --global user.name "your userName",
git config --global user.email "your email".
Step3: Android studio->File->Settings->GitHub-> login "your email"
Password "your password" -> test
Step4: VCS->import into version control->share Project.
Step 5: Successful.\

Git $ git remote rename
New repository name: eDiot1
Remote name github1

Related

why merge PR from github,but project Contributors not show correct?

for example:
https://github.com/ParadiseHell/one/pull/1
this PR author is punkisnotdead3
but in the project page:
https://github.com/ParadiseHell/one
we can see Contributors is:
punkisnotdead2
why? this error can be fixed?
The commit is written using #punkisnotdead2 from the device that's why it is added in the contributors .. if you want to keep use punkisnotdead3 change it from your device git configuration using
git config [--global] user.name "User name you want"
git config [--global] user.email "email you want to use"

Pushing code in to BitBucket using Ubuntu system with Tortoisehg

Am using Ubuntu system.In windows i can easy to add code in to BitBucket using source tree.But in Ubuntu i need to use TortoiseHg.I have created new repository and all but when am trying to add my path it showing 404 error?
How can i add project in to BItBucket?
Please provide step by step procedure.
try this:
1.Create repository in bit bucket
open your terminal and follow this step
1.cd /path/to/your/repo
2.sudo apt-get install git
3.if git exists then-> rmdir .git/
4.git init
5.git remote add origin https://username#bitbucket.org/your user name/your repository.git
6.git add .
7.git commit -am "first commit"
8.git push -u origin master
9.then enter your user name hit enter then enter password

git push -u origin master remote: Permission to user android studio

I was changed user for github in Android studio and trying to pushing code in repository but its getting error.
Repository successfully creating and commit also but in pushing time getting error.
F:\....>git push -u origin master
remote: Permission to abc.in/abc.git denied to olduser.
fatal: unable to access 'https://..../abc.git/': The requested URL returned error: 403
I also tried new project, but still getting old user name denied access error.
Why don't you push using Android Studio?
Have you got write permission on remote for new user?
Did you changed user in repo too? I think that you still have old data. Check it in project directory
git config user.name
git config user.email
You can check this trick
edit .git/config file under your repo directory
find url=entry under section [remote "origin"]
change it from
url=https://your_user_name#github.com/yy/repo_name.git
to
url=ssh://git#github.com/your_user_name/repo_name.git.
Alternatively
Create new repo in your remote server <- can be skipped
Remove existing git remote from local project
git remote rm origin
Add new remote
git remote add origin https://github.com/your_user_name/repo.git
I have no more idea :)

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.
Go to:
Setting --> Version Control --> GitHub --> Change you username.
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~
Uncheck the Use Credentials Helper from Settings -> Version Control -> Git. Then log in using the desired account and select the account you want to continue with from Settings -> Version Control -> GitHub.
In my case none of working. This way works for me.
Steps:
Open Settings of Android studio
Select Appearance & Behavior
Select System Settings
Select Passwords
Select Do not remember passwords
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
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
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>
I tried all methods, mentioned in all answers, but nothing works, but now I finally found the solution of this problem after stuggling from 1 week, so simply the issue is occuring because in window there is credential manager which is storing your old github credential, so simple steps to solve this issue are :-
step 1) Search Credential Manager
step 2) click here on Windows credentials
step 3) Delete your old github credentials
step 4) You are good to go, simply go to android studio and commit and push your code on github using terminal then it will automatically ask your to login to github then click on login via token using github token, then you are good to go :)
Hope this solutions solves everyone github issue :)
When prompted for a username and password, make sure you use an account that has access to the repository.
And in the image of Nir Duan, you must click to the button "test" to verify your connection.
I had the same problem, all you need to do is open your shell and type--
$git config --global user.name [your username]
$git config --global user.email [your email]
since you probably logged in with git using a different account
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!!!
You need to first go to:
Setting --> Version Control --> GitHub --> Change you username. (just like Nir Duan) said.
Then go to:
VCS --> Checkout of Version Control --> Github
Log in with new credentials if asked, Change the Git URL and possibly parent directory, Click on clone, open in another window, wait for it to load. close the new window.
Next time you want to push you will see the new repository as part of the options at the top left on the "Push commit" pop-up
I was also facing the same issue (working on same PC with diff usernames)
remote: Permission to new_username/repository_name.git denied to old_username.
Tried all solution mentioned even deleting .gitconfig didn't work.
In the end, solved by following different way :
1. Adding as Collaborator to old_username
2. Accept collaboration invitation (Make sure you are logged in to old_username)
3. Push with new_username. Done!
Go VCS>Commit and you will see Author field as shown:
Change author email Id
Edit GitHub Accouts
You can add / remove / replace GitHub accounts on Preferences -> Virsion Control -> GitHub.
If you have generated a new access token, consider removing the deprecated user, and adding the new one using "Log In with token":

Git-remote-https permission denied

I am using Android terminal IDE and I am trying to pull the master branch into my phone. I have done the following:
git config --global user.name "name"
git config --global user.email email
git init
git remote add origin http://github.com/blahblahblah
git clone https://github.com/blahblahblah
Typing git status gives me nothing to commit (on branch master). When I typed the last line above it gives me:
Cloning into 'blah'...
fatal: cannot exec 'git-remote-https': Permission denied
Thanks for helping!
Edit: This question is not identical to the other one because the other one has the wrong url. I am sure that I have the correct url.

Categories

Resources