初次配置git与github出现push不了的问题

ssh: connect to host gmail.com port 22: No route to host fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

 在配置github为远程仓库是出现如上报错,具体有两个:

1.没有创建repository

2.防火墙拦截。如果已经FQ,那就要修改配置文件

修改配置文件:

a》打开终端,cd到本地仓库文件下;

b》运行git config --local -e,获取文件的路径,前往文件

c》打开文件,将文件中的url = git@github.com:username/仓库name.git 修改为url = https://username@github.com/username/仓库name.git

posted @ 2016-07-02 11:37  yyw蔚然  阅读(1147)  评论(0编辑  收藏  举报