免密码使用github

来自软件实验室
跳转至: 导航搜索

首先,需要创建和上传ssh key,参见: https://help.github.com/articles/generating-ssh-keys/

其次,检查项目的.git/config文件,如果是类似下面这个样子:

[remote "origin"]
    url = http://github.com/subaochen/android-tutorial
    fetch = +refs/heads/*:refs/remotes/origin/*
 

则需要修改为:

[remote "origin"]
    url = git@github.com:subaochen/android-tutorial
    fetch = +refs/heads/*:refs/remotes/origin/*
 

参考:http://www.mikewootc.com/wiki/tool/sitebuild/github_sshkey.html