windows - Octopress博客部署错误 'rake aborted! No such file or directory - git remote -v'

标签 windows git github github-pages octopress

我在我的windows(windows8 x64)上成功安装了octopress,然后我创建了一个名为wenliangcan.github.com的存储库,并尝试在github上部署博客。

当我输入命令 rake setup_github_pages 并输入存储库 URL 时,出现错误:

rake aborted!
No such file or directory - git remote -v

在输入存储库网址之前,它给了我一个这样的示例:

Enter the read/write url for your repository
(For example, '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="82e5ebf6c2e5ebf6eaf7e0ace1edef" rel="noreferrer noopener nofollow">[email protected]</a>:your_username/your_username.github.com)

虽然一些第三方教程的示例如下所示:

<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2a4d435e6a4d435e425f4804494547" rel="noreferrer noopener nofollow">[email protected]</a>:your_username/your_username.github.com.git

我已经尝试过这两种方法,但它给了我同样的错误。

这是 CMD 的屏幕截图:

enter image description here

截图内容:

D:\Profiles\GitHub\Octopress>rake setup_github_pages
Enter the read/write url for your repository
(For example, '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="75121c0135121c011d00175b161a18" rel="noreferrer noopener nofollow">[email protected]</a>:your_username/your_username.github.com)
Repository url: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3f58564b7f58564b574a5d115c5052" rel="noreferrer noopener nofollow">[email protected]</a>:wenLiangcan/wenliangcan.github.com.git
rake aborted!
No such file or directory - git remote -v

Tasks: TOP => setup_github_pages
(See full trace by running task with --trace)

D:\Profiles\GitHub\Octopress>rake setup_github_pages
Enter the read/write url for your repository
(For example, '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5e39372a1e39372a362b3c703d3133" rel="noreferrer noopener nofollow">[email protected]</a>:your_username/your_username.github.com)
Repository url: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fb9c928fbb9c928f938e99d5989496" rel="noreferrer noopener nofollow">[email protected]</a>:wenLiangcan/wenliangcan.github.com
rake aborted!
No such file or directory - git remote -v

Tasks: TOP => setup_github_pages
(See full trace by running task with --trace)

我该如何解决这个问题?

谢谢!

最佳答案

 No such file or directory - git remote -v

这意味着您的 ruby​​ 脚本在当前执行 PATH 中找不到 git (有点像 this issue ),或者 rake 脚本以某种方式强制设置自己的 PATH。
因此,启动 rake 命令时请确保 PATH 正确:具体说明请参见“No such file or directory - git ls-files — WINDOWS ”。

另一个问题可能是 Window7 上的 ruby​​ 版本问题(1.9.2 工作,1.9.3 不工作)(请参阅“Installation on Windows 7 - segmentation fault when running "rake db:migrate" ”)

关于windows - Octopress博客部署错误 'rake aborted! No such file or directory - git remote -v',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12400185/

相关文章:

mysql - 如何从命令提示符检查数据库是否可用

java - 如何使用java访问github graphql API

Python - 使用 PyGithub 将文件直接上传到 github

c++ - 检测正在插入的 USB 驱动器 - Windows 服务

windows - git 克隆错误 : RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054

java - 我们可以从 Java 创建 Windows 服务吗?

git子模块添加需要更长的时间

javascript - 为 github 上的核心 grunt 任务做贡献

GIT_MERGE_AUTOEDIT=默认没有

encryption - 为松弛 channel 中的 travis 通知添加加密