GitHub 建立远程仓库
终端所有信息:
Last login: Fri Aug 14 08:58:01 on console
wuxiaoyuan:~ lan$ ls -al ~/.ssh
ls: /Users/lan/.ssh: No such file or directory
wuxiaoyuan:~ lan$ mkdir .ssh
wuxiaoyuan:~ lan$ cd /Users/lan/.ssh
wuxiaoyuan:.ssh lan$ ssh-keygen -t rsa -b 4096 -C "1149779588@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/lan/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/lan/.ssh/id_rsa.
Your public key has been saved in /Users/lan/.ssh/id_rsa.pub.
The key fingerprint is:
d6:62:85:4f:43:b1:60:4b:85:be:8d:43:3b:48:04:0c 1149779588@qq.com
The key's randomart image is:
+--[ RSA 4096]----+
| Eo.. +o+. |
| . .o.= . |
| . .o = |
| . o= . |
| . oS=o |
| .o*.. |
| o |
| |
| |
+-----------------+
wuxiaoyuan:.ssh lan$ pbcopy < ~/.ssh/id_rsa.pub
wuxiaoyuan:.ssh lan$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIUvEB2QI2ygbbnIkbKCBqTq1eYLb+uQV4ZFioNOqF1DNHh7tIFGl5UPEuFL+hqhz4rWANjisEv3zaBgXCgUlFPP9jOy0QlUN03K+nVVWzj++Jte0e3drD1MDwOAyV1ShD6sy8gsQp9mplnUn0QqS3zdlVe2otrSpfGPpPnD5L/Sv7uV27xszv8vJd73p2Wyayn4cIQ3rHmmvdOWbeQbvN54nGZBUFFt6KIdwLAQ0+ZeLCJavYoL8Ts2PsyzzSPmyHWUfneCpPrBY8CDkYQC3tsftt7ouKSNFURx/hU5eDzdAgu20pNUPasAZLk76VedhhijBU2i9P5OyQXtuwraTDDv2ih5rwvXKG7KgSMdA2UALDOtPF/mF2rftWY4XR7YzOXnsT+i4BXEVs+wmQ0JBMAyo05dCVzIVxglMc8ZEmCOATqFEgbtmqu+eX1DzudTSvQWsp8oO/he2J5g895yEKAXadiXB9VJKsL7Alaf2gNcmT+zD2/MakGtZJKvXDA7x99Ll2aWbbUtJkgpl1F6LFm7MrFG5xshj8cx7JMgq8muTcI+NZiW5c2NNA+6I/5zJwqXyUzhc6Ehl0ek4l6E8khedsywhcmgQQjwd3nXbDqQA1+of3ADCIOCGnvS1ARi3lgRTSFVBi+HwN35a3ZP3lWn+sFgkrPsVbBkiNzd9YWw== 1149779588@qq.com
wuxiaoyuan:.ssh lan$ ssh -T git@github.com
The authenticity of host 'github.com (192.30.252.129)' 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)?
Host key verification failed.
wuxiaoyuan:.ssh lan$ ssh -T git@github.com
The authenticity of host 'github.com (192.30.252.128)' 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.252.128' (RSA) to the list of known hosts.
Hi wusang! You've successfully authenticated, but GitHub does not provide shell access.
wuxiaoyuan:.ssh lan$ cd /Users/lan/Desktop/张三
wuxiaoyuan:张三 lan$ git clone https://github.com/wusang/lanou02.git
Cloning into 'lanou02'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
Checking connectivity... done.
wuxiaoyuan:张三 lan$ git status
fatal: Not a git repository (or any of the parent directories): .git
wuxiaoyuan:张三 lan$ cd /Users/lan/Desktop/张三/lanou02
wuxiaoyuan:lanou02 lan$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: lanou02/lanou02.xcodeproj/project.pbxproj
new file: lanou02/lanou02.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file: lanou02/lanou02/AppDelegate.h
new file: lanou02/lanou02/AppDelegate.m
new file: lanou02/lanou02/Base.lproj/LaunchScreen.xib
new file: lanou02/lanou02/Base.lproj/Main.storyboard
new file: lanou02/lanou02/Images.xcassets/AppIcon.appiconset/Contents.json
new file: lanou02/lanou02/Info.plist
new file: lanou02/lanou02/ViewController.h
new file: lanou02/lanou02/ViewController.m
new file: lanou02/lanou02/main.m
new file: lanou02/lanou02Tests/Info.plist
new file: lanou02/lanou02Tests/lanou02Tests.m
wuxiaoyuan:lanou02 lan$ open.
-bash: open.: command not found
wuxiaoyuan:lanou02 lan$ open .
wuxiaoyuan:lanou02 lan$ git add .
wuxiaoyuan:lanou02 lan$ git commit -am "添加了工程"
[master 41b1085] 添加了工程
13 files changed, 762 insertions(+)
create mode 100644 lanou02/lanou02.xcodeproj/project.pbxproj
create mode 100644 lanou02/lanou02.xcodeproj/project.xcworkspace/contents.xcworkspacedata
create mode 100644 lanou02/lanou02/AppDelegate.h
create mode 100644 lanou02/lanou02/AppDelegate.m
create mode 100644 lanou02/lanou02/Base.lproj/LaunchScreen.xib
create mode 100644 lanou02/lanou02/Base.lproj/Main.storyboard
create mode 100644 lanou02/lanou02/Images.xcassets/AppIcon.appiconset/Contents.json
create mode 100644 lanou02/lanou02/Info.plist
create mode 100644 lanou02/lanou02/ViewController.h
create mode 100644 lanou02/lanou02/ViewController.m
create mode 100644 lanou02/lanou02/main.m
create mode 100644 lanou02/lanou02Tests/Info.plist
create mode 100644 lanou02/lanou02Tests/lanou02Tests.m
wuxiaoyuan:lanou02 lan$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Username for 'https://github.com': wusang
Password for 'https://wusang@github.com':
Counting objects: 24, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (23/23), 8.51 KiB | 0 bytes/s, done.
Total 23 (delta 3), reused 0 (delta 0)
To https://github.com/wusang/lanou02.git
c054ac6..41b1085 master -> master
wuxiaoyuan:lanou02 lan$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: lanou02/lanou02/ViewController.h
modified: lanou02/lanou02/ViewController.m
no changes added to commit (use "git add" and/or "git commit -a")
wuxiaoyuan:lanou02 lan$ git add .
wuxiaoyuan:lanou02 lan$ git commit -am "从暂存库添加到本地仓库,添加了1111"
[master f27a890] 从暂存库添加到本地仓库,添加了1111
2 files changed, 4 insertions(+)
wuxiaoyuan:lanou02 lan$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 607 bytes | 0 bytes/s, done.
Total 6 (delta 4), reused 0 (delta 0)
To https://github.com/wusang/lanou02.git
41b1085..f27a890 master -> master
wuxiaoyuan:lanou02 lan$
GitHub 建立远程仓库的更多相关文章
- windows下使用git和github建立远程仓库
转自(http://www.bubuko.com/infodetail-430228.html) 从昨天开始就在看git的使用,因为在Windows下很多命令行操作都比较坑爹,但是今天再走了无数弯路之 ...
- git初次建立远程仓库问题
git "Could not read from remote repository.Please make sure you have the correct access rights. ...
- Android基础新手教程——1.5.2 Git之使用GitHub搭建远程仓库
Android基础新手教程--1.5.2 Git之使用GitHub搭建远程仓库 标签(空格分隔): Android基础新手教程 本节引言: 在上一节中.我们学习了怎样使用Git.构建我们的本地仓库.轻 ...
- git设置github的远程仓库的相关操作
git能够把github作为远程仓库,本地可以进行推送有关变更,从而多人可以进行协作开发工作. 1 ssh-keygen -t rsa -C "your-email@163. ...
- Git的本地仓库与GitHub的远程仓库
gitHub是一个面向开源及私有软件项目的托管平台,因为只支持git 作为唯一的版本库格式进行托管,故名gitHub.GitHub 是目前为止最大的开源 Git 托管服务,并且还是少数同时提供公共代码 ...
- 使用github作为远程仓库的常见git操作
[git上传本地代码到github新建仓库]一.建立git本地仓库 1.在本地目标文件夹(Code)中执行命令: git init //初始化本地仓库二.将上传到github的项目文件添加到本地仓库中 ...
- 使用git建立远程仓库,让别人git clone下来
首先, 如果你的ssh没有安装的话,要安装ssh服务端.ubuntu是很简单 sudo apt-get install openssh-server 1,建立你的git 目录. ourunix@ubu ...
- github创建远程仓库
创建远程仓库 当你已经在本地创建了一个Git仓库后,又想在GitHub创建一个Git仓库,并且让这两个仓库进行远程同步,这样,GitHub上的仓库既可以作为备份,又可以让其他人通过该仓库来协作,真是一 ...
- git用法小结(1)--建立远程仓库
最近一直在学习使用git来管理自己的程序,总是今天东学一点,明天西凑一点,到用的时候,总是有些茫然不知所措. 在博客园里看见一篇老好的文章,教我们做笔记啦,但是做完笔记还是要记得总结哦! 来吧,让我们 ...
随机推荐
- [Everyday Mathematics]20150101
(1). 设 $f(x),g(x)$ 在 $[a,b]$ 上同时单调递增或单调递减, 试证: \[ (b-a)\int_a^b f(x)g(x)\mathrm{\,d}x \geq \int_a^b ...
- 犯罪构成三层次记忆口诀 zt
犯罪构成三层次记忆口诀 2012-02-17 来源:为你辩护网 浏览次数:232 0 众所周知,犯罪构成“四要件”和犯罪构成“三层次”(“三阶层”)都是分析具体刑事案件的辅助性工具.犯罪构成四要件是指 ...
- C#操作Json(转)
原文:http://wenku.baidu.com/link?url=3dlqKdF26ZdQIAcX9jvP2ZYEtl3J0sKOV8XuHQI0Rz4SjB9S46nqmGiMXUVQa_1Pm ...
- 使用asp.net MVC4中的Bundle遇到的问题及解决办法
背景 之前有过使用MVC3的经验,也建过MVC4的基本样例看过,知道有bundle这么一个方法. 近日想建个网站使用MVC4,但是我觉得在基本样例上改不好,有太多无用的东西,所以就建了一个空白的MVC ...
- 进程隐藏与进程保护(SSDT Hook 实现)(二)
文章目录: 1. 引子 – Demo 实现效果: 2. 进程隐藏与进程保护概念: 3. SSDT Hook 框架搭建: 4. Ring0 实现进程隐藏: 5. Ri ...
- 你真的知道HTML吗?
经过几次面试当中,被问及到最基础的东西,没想到回答不上来,有点蛋痛,今天特地的复习了一下!! 内容: 1.Doctype(文档类型)的作用是什么?有多少文档类型? 2.浏览器标准模式和怪异模式之间的区 ...
- Java自定义日志输出文件
Java自定义日志输出文件 日志的打印,在程序中是必不可少的,如果需要将不同的日志打印到不同的地方,则需要定义不同的Appender,然后定义每一个Appender的日志级别.打印形式和日志的输出路径 ...
- Android-Native-Server 启动和注册详细分析
Android-Native-Server 启动和注册详细分析 以mediaService为实例来讲解: mediaService的启动入口 是一个 传统的 main()函数 源码位置E:\ ...
- Oracle-数据实现竖排打印
--存放重证评分的数据表create table ZZPFapache2( ZZ_datetime DATE, --时间 ZZ_zongfen INTEGER, --总分 ZZ_shiwan ...
- 第十三章、学习 Shell Scripts 条件判断式
利用 if .... then 单层.简单条件判断式 if [ 条件判断式 ]; then 当条件判断式成立时,可以进行的命令工作内容: fi <==将 if 反过来写,就成为 fi !结束 i ...