GitHub enables collaborative code submission by multiple people and permission group management.

Source: Internet
Author: User

GitHub enables collaborative code submission by multiple people and permission group management.

Reprinted please indicate the source:

Http://www.cnblogs.com/zhaoyanjun/p/5882784.html

From [Zhao yanjun's blog]

 

Preface:

In the previous article, Android github quickly achieves multi-person collaboration (http://www.cnblogs.com/zhaoyanjun/p/5829142.html) describes how to quickly implement multi-person collaboration function.

Its advantages are: simple operation and quick start. Disadvantage: there is no way to implement permission control. Why permission control? This is a problem, because we need to open read-only permissions (only read and clone) to some people for project security considerations ); you can also grant write permissions to some users (only read, clone, and push are allowed), or grant administrator permissions to some users (only read, clone, push, and add members to the repository ). In fact, github only manages four types of permissions. The first three permissions are Admin (Administrator), Write (Write only), and Read (Read-only ). The last type of permission is special. It is the creator of the Organization and has the highest privilege.

 

Body:

To understand github permission management, you need to understand several concepts. Organization (Organization),Repository (repository ),Team (Team).

Before learning about these concepts, let me tell you a little story. He once said that there was a businessman who was smart and competent. He opened a fruit stall, a tea shop, and an Internet cafe. Ten years later, he had accumulated a lot of money and had the right to be awesome. In general, he was lucky enough to have someone, so one day he led 100 brothers to set up a gang: qingbang. After the Organization was established, he divided 100 brothers into four teams, with 25 members in each team. After the establishment of the team, the brothers can't sit and starve to death, so he has a ktv, a supermarket, and a foot bath for health care. Then the problem arises. How can we allow four teams to take over these three projects? There must be clear permission control. If permission control is not proper, it will lead to the issue of mutual competition between our siblings. A project allows multiple teams to manage and one team can manage multiple projects. Therefore, there is a many-to-many relationship between the team and the project.

  • Role asset analysis in the story

Assets owned by businessmen: three items: fruit stalls, milk shops, and Internet cafes.

One organization: qingbang

Assets of qingbang organization: three projects: Ktv, supermarket, foot bath, and health care

4 teams

Note: fruit stalls, dairy shops, and Internet cafes are only assets of businessmen and are not owned by any organization. Now, a businessman can create a new project, such as a 4s store, and create another organization, such as a Hong Gang organization. You can also create multiple teams in the hongbang organization.

Now you can switch your ideas to github.

 

Businessmen -->Your registered github account

Fruit stalls -->Repository)

Qingbang -->Organization (Organization)

Team -->Team (Team)

 


1. github practice-create an organization

In stories, businessmen can create projects and organizations. Users corresponding to github can create warehouses and organizations.

 

Complete instance

 

2. github practice-create a repository in an organization

After the organization is created, let's take a look at the structure of the Organization.

Create a repository under the Organ-Name Organization

 

 

3. github practice-create a team in an organization

After the team is created, only one member of the team is assigned by default, which is the account. Add other members to the team.

After the invitation is successful, you need to be invited to your mailbox and click to confirm the invitation.

 

3. github practice-Add a team to the repository in the organization and Set permissions.

 

As you can see, the warehouse has three permissions for the team.

  • Admin administrator permissions (only read, clone, push, and add members to the repository)
  • Write Permission (read, clone, and push only)
  • Read Permission (read and clone only)

 

All permissions have been added here.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.