Git报错:fatal: not a git repository (or any of the parent directories): .git

$ git add .
fatal: not a git repository (or any of the parent directories): .git
解决上述报错
第一步 $ git init
第二步 $ git add .

$ git push origin master
ssh: Could not resolve hostname github: Name or service not known
解决上述报错
第一步 $ git remote rm origin
第二步 $ git remote add origin https://github.com/…(仓库地址).git
如果没有解决
第三步 $ ping github.com
把获取到到Pinging github.com [20.25.15.166] with 32 bytes of data中的20.25.15.166复制粘贴到C:\Windows\System32\drivers\etc\host文本格式打开的最后一行。
登录账号密码授个权

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值