github 的一些问题汇总

来源:互联网 发布:独立电影节知乎 编辑:程序博客网 时间:2024/06/05 09:34

1. 设置public-key

a. 首先在你的机器中生成public-key:
$ ssh-keygen -t rsa -C "${email}"
b. 然后将.ssh/id_rsa.pub的内容添加到github的“ssh keys”中
c. 设置Git的帐户信息
$ git config --global user.name "${username}"$ git config --global user.email "${email}"
d. 测试:
$ ssh -T git@github.com

2. 提交容易出错

a. 将项目中.git/config文件中的“url”对应的内容改成:
[remote "origin"]url = https://${user}:${passwd}@github.com/${user}/XXX.git


0 0
原创粉丝点击