rails:gitcafe仓库本地push失败

为了配合rails的实验,需要一个建立一个git的远程仓库,国内选择gitcafe,建立一个测试使用的git仓库.这个是免费.

本地建立仓库

git clone https://gitcafe.com/wwling2001/rails-toy.git

在本地仓库修改文件,然后提交.

git push origin master

本操作一直提示用户输入用户名和密码,无比的烦躁.通过remote命令查询得到origin是https://gitcafe.com/wwling2001/rails-toy.git.

实际上,通过git push直接操作过程使用的ssh协议,应该使用[email protected]:wwling2001/rails-toy.git作为远程仓的连接.这样才能解决一直需要录入用户名和密码的问题.

git remote add oop [email protected]:wwling2001/rails-toy.git

执行git push oop master成功且不需要密码.

你可能感兴趣的:(rails:gitcafe仓库本地push失败)