请看操作命令:
C:\Users\macrotea>ping www.github.com
正在 Ping github.com [192.30.252.128] 具有 32 字节的数据:
来自 192.30.252.128 的回复: 字节=32 时间=260ms TTL=44
来自 192.30.252.128 的回复: 字节=32 时间=268ms TTL=44
来自 192.30.252.128 的回复: 字节=32 时间=257ms TTL=44
来自 192.30.252.128 的回复: 字节=32 时间=258ms TTL=44
192.30.252.128 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 257ms,最长 = 268ms,平均 = 260ms
C:\Users\macrotea>type c:\Users\macrotea\.gitconfig
[user]
name = macrotea
email = macrotea@qq.com
[alias]
ci = commit
co = checkout
st = status
br = branch
throw = reset --hard HEAD
throwh = reset --hard HEAD^
C:\Users\macrotea>git --version
git version 1.8.5.2.msysgit.0
C:\Users\macrotea>git ls-remote --tags --heads git://github.com/twbs/bootstrap.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=No error
C:\Users\macrotea>ping 192.30.252.128
正在 Ping 192.30.252.128 具有 32 字节的数据:
来自 192.30.252.128 的回复: 字节=32 时间=360ms TTL=44
来自 192.30.252.128 的回复: 字节=32 时间=360ms TTL=44
来自 192.30.252.128 的回复: 字节=32 时间=360ms TTL=44
来自 192.30.252.128 的回复: 字节=32 时间=354ms TTL=44
192.30.252.128 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 354ms,最长 = 360ms,平均 = 358ms
C:\Users\macrotea> why ? help ! thanks!
此问题来源于当使用Yeoman进行yo webapp时出错:
npm http 304 https://registry.npmjs.org/grunt-autoprefixer
npm http 304 https://registry.npmjs.org/grunt-svgmin
bower bootstrap#~3.0.3
ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap.git", exit code of #128
Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.129]: errno=No error
events.js:74
throw TypeError('Uncaught, unspecified "error" event.');
^
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at Appgenerator.EventEmitter.emit (events.js:74:15)
at done (C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\lib\base.js:318:16)
at C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\node_modules\async\lib\async.js:232:13
at C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\node_modules\async\lib\async.js:113:21
at C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\node_modules\async\lib\async.js:24:16
at C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\node_modules\async\lib\async.js:229:17
at C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\node_modules\async\lib\async.js:516:34
at Appgenerator.<anonymous> (C:\Users\macrotea\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\yeoman-generator\lib\actions\install
.js:43:7)
at ChildProcess.EventEmitter.emit (events.js:117:20)
望君多指点!
应该是你的Github SSH配置问题
可以通过
来判断是否配置成功 如果显示
表示成功
具体如何配置SSH 请看
https://help.github.com/articles/generating-ssh-keys
应该是ssh网关的问题,github的ssh请求有时候会被封掉,不知道为什么
用https替换ssh就可以了
这篇文章推荐你
/blog/leewind/1190000000691712