我正在尝试使用iOS版的Woomerce SDK,我有一个cartfile

github "thii/WooCommerceSDK"

当我从我的项目目录中键入“carthage update”时,会出现如下错误
A shell task (/usr/bin/env git fetch --prune --quiet https://github.com/thii/WooCommerceSDK.git refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/*)
failed with exit code 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled

有人知道如何修正这个错误吗?

最佳答案

我只使用带有https的git,在我的个人和工作GitHub帐户之间来回切换,直到I found how to set it up to save credentials on a per-repository basis(现在它只询问我一次用户名和密码,第一次克隆每个repo时,再也不询问)。
当我尝试使用迦太基将框架添加到项目中并开始运行时:

$ carthage update

…我会得到错误:
shell任务(/usr/bin/env git clone--bare--quiet
https://github.com/ORGANIZATION_NAME/REPOSITORY_NAME.git
/用户/LOCAL_用户名/Library/Caches/org.carthage.CarthageKit/dependencies/FRAMEWORK_NAME)
退出代码128失败:致命:无法读取用户名
https://github.com/ORGANIZATION_NAME/REPOSITORY_NAME.git”:终端
已禁用提示
(强调我的)
迦太基Github页面上对问题#219的讨论给出了一个提示,让git在某个地方关闭repo,只需将该URL的凭据存储一次,然后在我的项目目录中再次运行$ carthage update,就可以了。
这是一个丑陋的解决办法,但我希望它能帮助有同样问题的人。

关于swift - 迦太基更新不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42964378/

10-13 06:01