Reputation: 349
So I have an Android Studio project that I have on Bitbucket that I'm having trouble moving to Github. So far I've imported the project to Github using its import feature and changed the origin using "git remote set-url". Now every time I try to push & commit using Android Studio I get the error "fatal: Could not read from repository". Also I don't know if it has anything to do with the problem but I have tried to change the SSH executable from built-in to native.
Edit: To clarify, the problem I'm having is committing and pushing using Android Studio. Everything works fine if I use git commands but when I use the Android Studio interface the "fatal: Could not read from repository" error pops up.
Upvotes: 1
Views: 1032
Reputation: 83517
I suggest creating separate remotes rather than changing the URL for origin
. For example, you can do
git remote add bitbucket <URL for BitBucket repo>
git remote add github <URL for GitHub Repo>
Now you can pull and push from each remote as you wish. For example
git checkout master
git pull bitbucket master
git push github master
Upvotes: 2