Let’s say I’m user1 and I have a Github account at http://github.com/user1. Naturally, I’d set up git locally as so:
origin git@github.com:user1/repo.git (fetch)
origin git@github.com:user1/repo.git (push)
What would I do if I have fetch & push permissions to someone else’s repo (let’s say user2) whose repo is located at http://github.com/user2/user2srepo.git?
EDIT:
Sorry, everyone is right with their answers. I should have clarified that I used to have it set up as origin http://github.com/user2/user2srepo.git but I wanted to avoid being asked for user credentials every single time I pushed.
Assuming your github repos are both for the same codebase, you can add them both as remotes to your local repo:
Then use that alias whenever you need it:
To do this with no authentication prompt, set up SSH keys for your self according the standard GitHub instructions and get the other person to add you as a collaborator on that repo.