怎样配置git ssh连接,怎样在GitHub上加入协作开发人员,怎样配置gitignore和怎样在GitHub上删除资源库.
**********1.在运行git push origin master指令时报例如以下错误:
iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ git push origin master
Username for 'https://github.com': IluckySi
Password for 'https://IluckySi@github.com':
Counting objects: 178, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (100/100), done.
eWfrror: RPC failed; result=56, HTTP code = 200 KiB/s
atal: The remote end hung up unexpectedly
Writing objects: 100% (123/123), 5.30 MiB | 13.00 KiB/s, done.
Total 123 (delta 49), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date 问题:eWfrror: RPC failed; result=56, HTTP code = 200 KiB/s
经上网查询,原因是http.postbuffer值较小,对postBuffer进行改动.
iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ git config --global http.postbuffer 24288000 iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ git config --list
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=sidongxue
user.email=sidongxue@sohu.com
http.postbuffer=24288000 //改动后的http.postbuffer
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.orgin.url=https://github.com/IluckySi/message.git
remote.orgin.fetch=+refs/heads/*:refs/remotes/orgin/*
remote.origin.url=https://github.com/IluckySi/message.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ git push origin master
Username for 'https://github.com': IluckySi
Password for 'https://IluckySi@github.com':
Counting objects: 178, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (100/100), done.
Writing objects: 100% (123/123), 5.30 MiB | 0 bytes/s, done.
Total 123 (delta 49), reused 0 (delta 0) 配置完后,继续运行git push origin master指令,依旧有问题,再次上网进行查询,经网上建议能够将https方式改为ssh方式.
登录Github发现reomte的url有三种连接方式:https,ssh和svn,git连接github默认使用https.
iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ git remote set-url origin git@github.com:IluckySi/message.git
iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ git push origin master
Received disconnect from 192.30.252.129: 11: Bye Bye
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists. 改动完后,继续运行git push origin master指令,还是有问题,再次上网进行查询,
原来通过ssh连接github须要通过key.
iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ ssh-keygen -t rsa -C "1151262684@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/zhangmengjiao/.ssh/id_rsa):
/c/Users/zhangmengjiao/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 输入githubpassword
Enter same passphrase again: 输入githubpassword
Your identification has been saved in /c/Users/zhangmengjiao/.ssh/id_rsa.
Your public key has been saved in /c/Users/zhangmengjiao/.ssh/id_rsa.pub.
The key fingerprint is:
ce:eb:cd:8e:5e:80:e9:3b:d6:f8:c2:75:63:d2:28:0d 1151262684@qq.com
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| Eo |
| ooSo |
| ..o=.= |
| ..=o+.. |
| *..* |
| ..**.+ |
+-----------------+ iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
生成key后,在/c/Users/用户/文件夹下会生成一个.ssh文件夹,将.ssh文件夹下id_rsa.pub文件里的内容
依照例如以下图片加入到github中,加入完毕后,再次运行指令,ok,成功了!
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
$ git push origin master
Enter passphrase for key '/c/Users/zhangmengjiao/.ssh/id_rsa':
Counting objects: 178, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (100/100), done.
Writing objects: 100% (123/123), 5.30 MiB | 44.00 KiB/s, done.
Total 123 (delta 49), reused 0 (delta 0)
To git@github.com:IluckySi/message.git
8dae8c8..f6dc5b2 master -> master iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ 问题:https,ssh和svn的差别?官方建议使用https.
參考http://stackoverflow.com/questions/11041729/why-does-github-recommend-https-vs-ssh **********2.加入协作开发人员.
依照git例如以下图片加入协作开发人员.
注意:协作开发人员也要有自己的GitHub账户,本地的GitHub工作空间.
协作开发人员通过指令将管理员的项目clone一份,clone的url是管理员GitHub上的项目url.
这样协作开发人员就能够在自己的工作空间对项目进行各种操作了. 除了上面的合作方式,另一种合作方式:通过fork和pull request.
依照例如以下图片将管理员的项目fork一下,即将管理员的项目打一个分支到自己的GitHub上
然后将自己GitHub上的项目clone一份到本地的工作空间,这样就能够对项目进行各种操作了,这里的操作不会影响到
管理员GitHub上的项目.假设有一天自己的任务完毕了,能够通过发一个pull request与管理员分享,
假设管理员觉得没有问题,能够进行merge,假设觉得有问题,能够进行讨论. 參考http://tech.marsw.tw/blog/2013/08/17/git-notes-github-n-person-cooperation-settings/ **********3.忽略某些文件提交.
通过例如以下指令,在git资源库文件夹下生成.gitnore文件.
iluckysi@ILUCKYSI-PC /d/ilucky/message/code (master)
$ touch .gitignore
然后在.gitnore文件夹下配置忽略的文件,例如以下:
message-web/test/*
message-web/target/*
message-web/bin/*
message-web/src/main/resources/message.properties
忽略某些文件提交的目的有两个:
1.对于一些二进制数据没有必要进行提交.
2.对于一些敏感信息,比如数据库连接信息等不能进行提交. **********4.在GitHub上删除资源库.
怎样配置git ssh连接,怎样在GitHub上加入协作开发人员,怎样配置gitignore和怎样在GitHub上删除资源库.的更多相关文章
- 图文详解如何利用Git+Github进行团队协作开发
团队协作开发中,大部分都会用到版本控制软件,比如Git.Svn等.本文将通过一个实例,详细讲解在真实的工作环境中,一个团队应该如何利用Git+Github进行协作开发,即详解Git工作流程.并就其中比 ...
- GitHub 多人协作开发 三种方式:
GitHub 多人协作开发 三种方式: 一.Fork 方式 网上介绍比较多的方式(比较大型的开源项目,比如cocos2d-x) 开发者 fork 自己生成一个独立的分支,跟主分支完全独立,pull代码 ...
- Git SSH连接方式配置
如果使用ssh的方式管理,需要配置ssh key. 1.打开git bash命令窗口 2.生成ssh key ssh-keygen -t rsa -b 4096 -C "your_email ...
- eclipse 配置git ssh登录
实现需要安装git的插件,由于我使用的adt和eclipse for javaee版本两个,都已经安装了git插件,就不再演示了,网上都有. 这篇文章主要是介绍使用ssh进行认证的方式. 1.首先,配 ...
- Jmeter配置通过SSH连接的mysql数据库
jmeter连接配置mysql数据库时,如果数据库服务器没有通过ssh连接,则只需要添加配置相应的jdbc参数就可以了.如果数据库服务器是通过SSH连接的,则需要通过中间远程连接工具来登录,此处使用的 ...
- git ssh 22 端口不可用时通过https 443 端口配置git ssh
Using SSH over the HTTPS port Sometimes, firewalls refuse to allow SSH connections entirely. If usin ...
- 配置git远程连接gitlab
1.本地git下载 2.配置全局的用户名和邮箱,命令分别为 git config --global user.name "username" git config --global ...
- win10配置git SSH
1.安装的过程就不说了,直接去官网下载git for windows 安装便可 安装完了,无非就是像用它,就想从github上clone项目下来,仅仅是安装了git还不能直接从远程下载项目下来哦,还需 ...
- VM虚拟机 Ubuntu配置与ssh连接
VMware安装ubuntu 自定义 不作更改 选择稍后安装操作系统,相当于裸机,没装系统. 选择ubuntu64 选择虚拟机名字与保存路径 配置情况 2G即可 网络类型,选择NAT 可以了解一下这几 ...
随机推荐
- hdu1695(莫比乌斯反演)
传送门:GCD 题意:求[1,n],[1,m]gcd为k的对数. 分析:莫比乌斯入反演门题,gcd(x,y)==k等价于gcd(x/k,y/k)==1,求出[1,n][1,m]互质的对数,在减去[1, ...
- android4.3环境搭建
方案一: 首先android环境搭建有如下几个东西是必须准备的: 1. Eclipse (下载地址:http://www.eclipse.org/downloads/,建议至少3.4及以上版本) 2 ...
- TkinterGUI - 初识Tkinter
前言 近期有写一个简单GUI程序的点子,具体写什么就不说了,但一个要求就是有跨平台的功能. 确切的讲,是我希望这个程序写好后能同时在Windows和Linux下运行,而且要方便随时修改. 对于编程语言 ...
- hdu2606(递推)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2606 题意: 用1*1,2*2,3*3,4*4的正方形填充4*n的矩形, 问有多少种不同填法. 分析 ...
- Urban Dictionary: psd
Urban Dictionary: psd psd Share on twitter Share on facebook Share on more 3 up, 1 down It means Poo ...
- POJ 2676/2918 数独(dfs)
思路:记录每行每列每一个宫已经出现的数字就可以.数据比較弱 另外POJ 3074 3076 必须用剪枝策略.但实现较麻烦,还是以后学了DLX再来做吧 //Accepted 160K 0MS #incl ...
- SurfaceView的一个小应用:开发示波器
SurfaceView与普通View还有一个重要区别:View的绘图必须在UI线程中进行,但SurfaceView不存在这个问题,因为它是由SurfaceHolder来完成的.所以对于View组件,如 ...
- k-d tree算法
k-d树(k-dimensional树的简称),是一种分割k维数据空间的数据结构.主要应用于多维空间关键数据的搜索(如:范围搜索和最近邻搜索). 应用背景 SIFT算法中做特征点匹配的时候就会利用到k ...
- GCC的使用(编译,链接,运行)
以下这三篇日志非常的好,真的非常的好.介绍使用gcc编译,链接,运行c程序. 1.http://lveyo.iteye.com/blog/240578 2.http://lveyo.iteye.com ...
- windows phone 7 通过Post提交URL到服务器,从服务器获取数据(比如登陆时候使用)
原文:windows phone 7 通过Post提交URL到服务器,从服务器获取数据(比如登陆时候使用) HttpWebRequest myRequest = (HttpWebRequest)Web ...