Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2566243
  • 博文数量: 315
  • 博客积分: 3901
  • 博客等级: 少校
  • 技术积分: 3640
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-08 15:32
个人简介

知乎:https://www.zhihu.com/people/monkey.d.luffy Android高级开发交流群2: 752871516

文章分类

全部博文(315)

文章存档

2019年(2)

2018年(1)

2016年(7)

2015年(32)

2014年(39)

2013年(109)

2012年(81)

2011年(44)

分类: 项目管理

2012-08-23 21:24:45

  看了网上各种方法,发现对于自己的配置文件不行。不过有篇文章倒是帮了很大的忙:


先clone下来 git clone git@github.com:FanChael/Hash.git Hash

方法如下:

So you need to change your repo config on your PC to ssh way:

  1. edit .git/config file under your repo directory
  2. find url=entry under section [remote "origin"]
  3. change it from url= url=ssh://git@github.com/derekerdmann/lunch_call.git. that is, change all the texts before @ symbol to ssh://git
  4. Save config file and quit. now you could use git push origin master to sync your repo on GitHub
  5. 但是对于我的配置文件如下:和他的根本不一样??
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url =
[branch "master"]
    remote = origin
    merge = refs/heads/master

 不过偶然间我改成了如他所说的情况,再git push origin master就OK了.

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = ssh://git@github.com/FanChael/Hash.git
[branch "master"]
    remote = origin
    merge = refs/heads/master


其他信息:http://my.oschina.net/shootercn/blog/13476
阅读(11307) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~