用git上传项目到github
1 git clone github仓库地址
2 git add .
3 git commit -m "changes log"
4 git remote add origin http://git地址
4 git push -u origin master
http://jingyan.baidu.com/article/f7ff0bfc7181492e27bb1360.html
错误1:git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct access rights.and the repository exists.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
出现这个问题是因为,没有在github账号添加SSH key
解决方法如下
在终端输入。
ssh-keygen -t rsa -C "forwhat.cn"//注意。forwhat.cn为用户名
如果执行成功。返回
Generating public/private rsa key pair.
Enter file in which to save the key (/home/forwhat.cn/.ssh/id_rsa):
在这里就是设置存储地址了.反正我是直接按的回车
然后还会返回
Enter passphrase (empty for no passphrase):
再次直接回车。
Enter same passphrase again:
再次回车。
Your identification has been saved in /home/forwhat.cn/.ssh/id_rsa.
Your public key has been saved in /home/forwhat.cn/.ssh/id_rsa.pub.
The key fingerprint is:
这里有一串数。我把他屏蔽了。
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| o |
| + . S |
| . = . o |
| o + +o.o |
|E o . o.=+. |
|.+ ==+ooo. |
+-----------------+
这样SSH key就生成了。直接cat一下就好了。
000000:~/a$ cat /home/forwhat.cn/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQ(我屏蔽了)
把显示出来的直接添加到github账户设置里边的SSH keys
。add.
回来在git pull
就开始远程拷贝代码了
错误2:Updates were rejected because the remote contains work that you do not have
git pull origin master
http://blog.csdn.net/jackystudio/article/details/12309531
用git上传项目到github的更多相关文章
- 使用git上传项目到GitHub上
之前的博客有<使用git拉取GitHub上的项目>的文章,那么现在说一下,如何上传项目到GitHub上. 1. Git的.gitignore 文档配置 因为项目中可能有很多的图片还有nod ...
- 用git上传项目到GitHub或者码云全过程
用git上传项目到GitHub或者码云全过程 1. 会生成一个隐藏文件夹".git".这是一个不可删文件,因为暂存区和历史区还有一些其他的信息都在这里,删掉就不是一个完整的仓库了 ...
- Git 上传项目到 Github
Git 上传项目到 Github 该文章主要讲解Git 上传项目到 Github,Gitee同理 配置Git 下载.安装Git 下载后一路(傻瓜式安装)直接安装即可 如果第一次使用git的话,需要设置 ...
- 直接利用本地git上传项目到github
http://m.blog.csdn.net/article/details?id=50441442 本文将详细介绍如何托管你的项目到github上 转载请标明出处: http://blog.cs ...
- git上传项目到github简易步骤
第一步: 在github创建仓库,创建完成进入该仓库,仓库地址如:https://github.com/winerss/wcMall格式 第二步:使用git,cd到本地项目目录下,执行git明令: g ...
- git上传项目到github远程库
最近在学习使用 git 上传管理项目,依照教程,建好了一个远程库,也实现了本地库与远程库的项目同步上传,但是在试着将本地库里的项目上传到另一个新建远程库时遇到了问题,一直上传不成功,经过一番查找摸索终 ...
- 利用Git上传项目到github以及遇到的问题
今天学习如何利用git从本地端上传项目,以及遇到问题的解决方法 1.要有自己的github账号,并创建一个仓库, 2.输入仓库的名称,直接Create 注:记住常见成功后的这个地址,后边要用到: 3. ...
- 使用Git上传项目到GitHub仓库
GitHub账号注册很长时间了,但是没怎么上传过东西.今天学习如何利用Git工具将代码上传到GitHub,了解了一些常用命令 $ git config --global user.name " ...
- Git上传项目到GitHub
1.注册账户 https://github.com/ 2.创建仓库 3.需要安装 Git http://msysgit.github.com/ 4.本地创建ssh key(不是必要,不创建ssh可 ...
- 使用git上传项目到github
来自: http://www.cnblogs.com/specter45/p/github.html GitHub是基于git实现的代码托管.git是目前最好用的版本控制系统了,非常受欢迎,比之svn ...
随机推荐
- linq中的GroupBy总结
1.简单形式: var q = from p in db.Products group p by p.CategoryID into g select g; 语句描述:Linq使用Group By按C ...
- 使用mybatis查询数据,按特定顺序排序
有如下表table_people id name 1 dwyane 2 james 3 paul 4 bosh ...
- 一个简单的web框架实现
一个简单的web框架实现 #!/usr/bin/env python # -- coding: utf-8 -- __author__ = 'EchoRep' from wsgiref.simple_ ...
- [C++]Infinite House of Pancakes——Google Code Jam 2015 Qualification Round
Problem It’s opening night at the opera, and your friend is the prima donna (the lead female singer) ...
- 《Pointers On C》读书笔记(第五章 操作符和表达式)
1.C语言操作符优先级表 2.算术操作符中%(取模操作符)只适用于整型类型,其余几个操作符(+.-.*./)既适用于整型类型也适用于浮点类型.当/操作符的两个操作数都是整型时,它执行整除运算,其它情况 ...
- Linux 硬盘、网卡
根据硬盘接口的不同,在Liunx中会有不同的命名 IDE 接口的硬盘会被叫成: hda,hdb,hdc (hd -- hard disk) hda 表示第一块硬盘,hdb表示第二块硬盘! 一般来说我们 ...
- eclipse及Java常用问题及解决办法汇总
junit-test 我觉得这点比idea好用,可以直接选中要测试的方法名,右击run as即可 http://www.cnblogs.com/brolanda/p/4532779.html 打开您的 ...
- sql update 触发器 可获得被update的行的信息
类型:转载 sql update 触发器 可获得被update的行的信息,需要的朋友可以参考下. 复制代码 代码如下: create trigger TgName on tb for update ...
- 使2个div 在一行上显示
<!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...
- 关于一个wpf中的定时器
http://www.cnblogs.com/royenhome/archive/2010/01/24/1655168.html