zoukankan      html  css  js  c++  java
  • Git系列三之GitHub使用方法

      GitHub 是一个面向开源及私有软件项目的托管平台,因为只支持 Git 作为唯一的版本库格式进行托管,故名 GitHub。
    GitHub 于 2008 年 4 月 10 日正式上线,除了 Git 代码仓库托管及基本的 Web 管理界面以外,还提供了订阅、讨论组、文本渲染、在线文件编辑器、协作图谱(报表)、代码片段分享(Gist)等功能。目前,其注册用户已经超过430万,托管版本数量也是非常之多,其中不乏知名开源项目 Ruby on Rails、jQuery、python 等。

    代码托管地址:https://github.com

    一、认证方式

    1、https方式:不需要认证

    [root@git-node1 demo]# git clone https://github.com/nulige/Bastion-of-machine.git
    Initialized empty Git repository in /root/demo/Bastion-of-machine/.git/
    warning: You appear to have cloned an empty repository.
    [root@git-node1 demo]# ll
    总用量 8
    drwxr-xr-x 3 root root 4096 5月   8 22:05 Bastion-of-machine
    -rw-r--r-- 1 root root   15 5月   8 20:25 index.php

    2、ssh方式:需要认证

    [root@git-node1 demo]# git clone git@github.com:nulige/Bastion-of-machine.git
    Initialized empty Git repository in /root/demo/Bastion-of-machine/.git/
    The authenticity of host 'github.com (192.30.255.112)' can't be established.
    RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
    warning: You appear to have cloned an empty repository.
    [root@git-node1 demo]# 
    [root@git-node1 demo]# ll
    总用量 8
    drwxr-xr-x 3 root root 4096 5月   8 21:57 Bastion-of-machine
    -rw-r--r-- 1 root root   15 5月   8 20:25 index.php

    二、使用方法

    1、把本地仓库代码推到远程项目仓库(针对已经存在项目仓库)

  • 相关阅读:
    br-lan、eth0、eth1及lo (转)
    openwrt MT7628 编译前更改为DHCP,root 密码、ssid、时区、主机名
    Openwrt Uboot烧写
    区块链公链“三元悖论”专题之可扩展性(Scalability)
    物联网开发|如何选择一款适合你的物联网操作系统?
    oracle 处理Session不够用
    Redis 数据总结 (2.命令实现逻辑)
    Redis 数据总结(1 数据导入)
    Redis 数据库使用和搭建
    MySql 存储大量长字节 Text报错处理办法
  • 原文地址:https://www.cnblogs.com/nulige/p/6828099.html
Copyright © 2011-2022 走看看