github相关

  • 错误: The requested URL returned error: 403 Forbidden while accessing

vim .git/config
[remote "origin"]
    url = https://github.com/wangz/example.git
改成 
[remote "origin"]
    url = https://[email protected]/wangz/example.git

参考:http://blog.csdn.net/happyteafriends/article/details/11554043

  • 解决github总是要输入密码及改进ssh

两个重要的目录

cd ~./ssh
cd your project dir
vim .git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = ssh://[email protected]/名字/example.git    //https改成ssh
[branch "master"]
    remote = origin
    merge = refs/heads/master

具体参考:
https://help.github.com/articles/generating-ssh-keys/

github相关_第1张图片
Paste_Image.png

你可能感兴趣的:(github相关)