提示:这里描述项目中遇到的问题:
git push --set-upstream origin master
时,超时失败,显示如下错误:
connect to host git.acwing.com port 22:
Connection timed out fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
使用https协议,不要使用ssh协议
在你的git init的本地仓库目录,执行命令 git config --local -e
然后把里面的url配置项从git格式url = git@git.acwing.com:username/xx.git
修改为https格式url = https://git.acwing.com/username/xx.git
然后再执行git push --set-upstream origin master
输入git.acwing的账号名和密码就能成功git push
到云端了。
**可以直接修改为https格式url = https://username:passwd@git.acwing.com/username/xx.git
**这样就不用每次push
都重新输入账号密码了