-2

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.

1
  • Add them as collaborators on the repo (in the Settings tab).
    – Ry-
    Commented Apr 17, 2016 at 8:55

2 Answers 2

1

Have you looked at this? Your mates can propose file changes. Then all you have to do is accept them.

2
  • thanks and I mean if it's possible for mates to push code directly in my repository without my acceptance
    – nasuf
    Commented 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
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.