【发布时间】:2019-01-27 17:34:59
【问题描述】:
我根据this manual安装了pod apollo,然后在你必须创建运行时的阶段,构建不起作用,它返回这个错误我不明白为什么..
Can't find Apollo CLI. Installing...
npm ERR! Error while executing:
npm ERR! /Applications/Xcode.app/Contents/Developer/usr/bin/git ls-remote -h -t ssh://git@github.com/Project/fitto-ios.git
npm ERR!
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mickaelbelhassen/.npm/_logs/2018-08-21T13_43_18_743Z-debug.log
Command /bin/sh failed with exit code 1
而且我不明白他为什么谈论 git ..
另外,仓库ssh://git@github.com/Project/fitto-ios.git是我的远程仓库,和Apollo没有关系。
这里是我的运行脚本,和官方文档一样:
APOLLO_FRAMEWORK_PATH="$(eval find $FRAMEWORK_SEARCH_PATHS -name "Apollo.framework" -maxdepth 1)"
if [ -z "$APOLLO_FRAMEWORK_PATH" ]; then
echo "error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project."
exit 1
fi
cd "${SRCROOT}/${TARGET_NAME}"
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-cli.sh codegen:generate --queries="$(find . -name '*.graphql')" --schema=schema.json API.swift
【问题讨论】: