I want to develop a project with mates . The project is in my repository. If it is possible for my mates to commit their code to my repository directly using their own accounts without my permission and code review? How to realize this? I need some details. Thanks a lot.
2 Answers
Have you looked at this? Your mates can propose file changes. Then all you have to do is accept them.
-
thanks and I mean if it's possible for mates to push code directly in my repository without my acceptance– nasufCommented Apr 17, 2016 at 8:58
-
@user1826 Try this then. It allows you to add your friends to the organisation. Don't forget to press the tick button if this worked! Commented Apr 17, 2016 at 10:42
The best way is to add multiple ssh keys per account and then add them to your config file.
https://gist.github.com/jexchan/2351996
create different public key
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
for example, 2 keys created at:
~/.ssh/id_rsa_1
~/.ssh/id_rsa_2
Add these two keys to the ssh-agent:
$ ssh-add ~/.ssh/id_rsa_1
$ ssh-add ~/.ssh/id_rsa_2
you can delete all cached keys before
$ ssh-add -D
check your keys
$ ssh-add -l
Add the keys to the config file:
***
#activehacker account
Host github.com-1
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_1
#jexchan account
Host github.com-2
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_1