How to Use git to create a key

Source: Internet
Author: User
Tags create wiki hosting how to use git
How to generate a Public Key (VIA) Workflow Install and set git

Download the latest version of Git

http://git-scm.com/downloads

When you install git, You need to perform simple configuration to open the terminal:

User Name

Step 1: Tell git your name. This name will appear in your submission record.

Git config -- global user. Name "your name"
Email

Next is your email. Similarly, this email will also appear in your submission record. Please try to keep this email consistent with your [email protected] registered email.

Git config -- global user. Email "your email"
Clone and push

Clone Project

git clone http://git.oschina.net/xxxxxx/xxxxxx.git

Create a feature Branch

git checkout -b $feature_name

Write code and submit changes

git commit -am "My feature is ready"

Push your submission to git @ OSC

git push origin $feature_name

On the submit page, you can view your changes, for example:

Http://git.oschina.net/oschina/git-osc/commit/f3dd1c5bae48fa4244e2595a39e750e5606dd9be

Create a pull request

You can fork any public project. When you modify your fork project, you can submit a pull request to the Source Project. After reviewing the Code, the project Author can decide whether to apply the change to the source project.

SSH keys

The SSH key allows you to establish a secure encrypted connection between your computer and git @ OSC.

Run the following command to generate an sshkey:

ssh-keygen -t rsa -C "[email protected]"# Creates a new ssh key using the provided email# Generating public/private rsa key pair...

View your public key and add it to git @ OSC http://git.oschina.net/keys

cat ~/.ssh/id_rsa.pub# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....

Enter

ssh -T [email protected]

If

Welcome to [email protected], yourname! 

It indicates that the add operation is successful.

About Permissions Visitor
  • Create an issue
  • Comment
  • Clone and pull Projects
  • Package and download code
  • Fork Project
  • Create a pull request
Reporter
  • Inherit guest Permissions
  • Private project: Code cannot be viewed
  • Private project: Code cannot be downloaded
Observer
  • Inherit the reporter permission
  • Create Wiki
  • Package and download code
  • Private project: Code cannot be pushed
Developer
  • Create an issue
  • Comment
  • Clone and pull Projects
  • Package and download code
  • Create a pull request
  • Create Branch
  • Push Branch
  • Delete Branch
  • Create tags (milestones)
  • Create Wiki
Administrator
  • Create an issue
  • Comment
  • Clone and pull Projects
  • Package and download code
  • Create a pull request
  • Create Branch
  • Push Branch
  • Delete Branch
  • Create tags (milestones)
  • Create Wiki
  • Add a project member
  • Forced push Branch
  • Edit Project Properties
Project Team Administrator
  • Edit project group attributes
  • Add members
  • Add/delete a project
  • Set Project Team Administrator
  • Delete Project Team
  • Change member project Permissions
Git @ OSC flavored markdown

The GIT @ OSC markdown extension is based on the original markdown. The usage is as follows.

You can use GFM in:
  • Submit message
  • Comment
  • Issues
  • Pull requests
  • Milestone
  • Wiki page
Differences from traditional markdown: Automatic URL link
The inserted URL automatically becomes a link without special processing.
Emoji

Supports emoji expressions. For more information, see emoji cheat sheet.

Insert code snippet

You can insert code snippets in the following way. You can specify the programming language after the tag. If no language is specified, the compiler will attempt to automatically identify the program.

```rubyrequire ‘redcarpet‘markdown = Redcarpet.new("Hello World!")puts markdown.to_html```

Will become

require ‘redcarpet‘markdown = Redcarpet.new("Hello World!")puts markdown.to_html
Special git @ OSC reference.

GFM can recognize some special tags and supports Automatic completion. For example:

  • #123 (Issue)
  • ! 123 (pull request)
  • 1234567 (submit)
  • : Icon: (emoji)
How to import external git repositories?

For some reasons, the one-click Import function is not yet available.
If you have any requirements, follow the steps below to import the GIT Repository from other places (take impress. js on GitHub as an example ):

1.Clone a bare Repository from the original address:

git clone --bare  https://github.com/bartaz/impress.js.git

2.Create a project on git @ OSC

3.Push the clone project to git @ OSC in mirror mode: (if you are prompted to enter the GIT user password, please add the SSH key to the http://git.oschina.net/keys)

cd impress.js.gitgit push --mirror [email protected]:username/impress-js.git

The advantage of this method is that all branch and tag information of the original project can be fully retained.
Tip: for the first time, the internal push capacity is large. We recommend that you use SSH to push the data faster and more stable. If the project is small, you can also use HTTP to push the data.

For more import methods, click here

Use of Project Team

The project team makes it easier for users to add users to the project.

1.Create Project Team: http://git.oschina.net/teams/new

2.Add a user: You can set two permissions. One is the user's permissions in the project by default, and the other is the project team's management permissions.

3.Assign to project: If you select a developer, the project will be added according to the user's default permissions in the project team. If you select an administrator, all members of the project team will become Project administrators.

4.Undo project: revoking a Project removes a Member from a project group. If a member also exists in a project group, the Member is updated to the corresponding project permissions of another project group.

Tips

  • Only members of the project team can access

  • The project team name is unique across the site

  • A user exists in two Project Teams A and B. The project permission in a is administrator, and the project permission in B is developer. If Project Team A and B are assigned to project pro at the same time, after Project Team A is removed from Pro, the permissions of this user in pro will be reduced from administrator to developer.

Continue reading

You can click here to read the authoritative git book progit

The following is a collection of [email protected] and various IDE and software integration methods developed by enthusiastic netizens in the open-source Chinese community. You can click to view them:

  • Use egit plug-in eclipse-illustrated by illustrations-Details

  • Connect to OSC @ tokune in Visual Studio 2012

  • How tortoisegit works with msysgit in [email protected] Code hosting

  • Use eclipse's git plug-in egit to interact with [email protected]

  • Git initial experience

  • Using tortoisegit (Turtle GIT) in win7 to perform git @ OSC

  • Connect git @ OSC using xcode

  • Git @ OSC (GIT) team development, fork, and pull request usage

  • Integrate git @ OSC with the GIT plug-in of eclipse

  • Eclipse uses egit to manage [email protected] Projects

  • How to import external git repository to China's source code hosting platform (GIT @ OSC)

I sincerely thank the netizens @ nekocode @ platinum poop @ Kai Ge @ whaon @ @ Sima Ben @ Maple Leaf drifting @ Damo real person for carefully organizing and sharing information.

How to Use git to create a key

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.