0

我在将 Polymer 组件上传到 gh 页面时遇到问题。

我正在从教程中尝试这个:

    # git clone the Polymer tools repository somewhere outside of your 
# element project
git clone git://github.com/Polymer/tools.git

# Create a temporary directory for publishing your element and cd into it
mkdir temp && cd temp

# Run the gp.sh script. This will allow you to push a demo-friendly
# version of your page and its dependencies to a GitHub pages branch
# of your repository (gh-pages). Below, we pass in a GitHub username
# and the repo name for our element
../tools/bin/gp.sh <username> <test-element>

# Finally, clean-up your temporary directory as you no longer require it
cd ..
rm -rf temp

但它不起作用。在终端我有这个错误:在此处输入图像描述

我有什么东西,失踪了?

4

1 回答 1

0

这是你的问题:

权限被拒绝(公钥)。
致命:无法从远程存储库中读取。

请确保您具有正确的访问权限
并且存储库存在。

为了使脚本按预期运行,您需要将您的公共 ssh 密钥添加到您的 github 项目中。设置 -> 部署密钥 -> 添加部署密钥。

或者,您可以手动执行 gp.sh 中涉及从 github 拉取和推送到 github 的步骤。

如果您不想拆分脚本,请尝试手动运行命令,这应该可以。脚本中唯一的多行命令是这个:

echo "{
  \"directory\": \"components\"
}
" > .bowerrc

祝你好运。

于 2017-07-21T12:55:19.273 回答