rwpickflavor.podspec规范未验证

发布于 2025-02-01 07:51:53 字数 1324 浏览 1 评论 0原文

我通过遵循本教程来学习: https://www.raywenderlich.com/5823-操作方法创作-A-cocoapod-in-swift

我被困在它说的地方: 使用您的新可可录

在我写的终端中

cd ~/Documents/Libraries/RWPickFlavor 
pod repo add RWPodSpecs https://github.com/user/RWPodSpecs.git 
pod repo push RWPodSpecs RWPickFlavor.podspec

:但是我会遇到很多错误:

[!] /usr/bin/git clone https://github.com/user/RWPodSpecs.git -- RWPodSpecs

fatal: destination path 'RWPodSpecs' already exists and is not an empty directory

而且:

Validating spec
 -> RWPickFlavor (0.1.0)
    - NOTE  | url: The URL (https://github.com/user/RWPickFlavor) is not reachable.
    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/user/RWPickFlavor.git /var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a --template= --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
) during validation.

[!] The `RWPickFlavor.podspec` specification does not validate.

有什么想法吗?

I'm learning by following this tutorial:
https://www.raywenderlich.com/5823-how-to-create-a-cocoapod-in-swift

And I'm stuck in the place where it says:
Using Your New CocoaPod

in the terminal I wrote:

cd ~/Documents/Libraries/RWPickFlavor 
pod repo add RWPodSpecs https://github.com/user/RWPodSpecs.git 
pod repo push RWPodSpecs RWPickFlavor.podspec

but I get a lot of errors:

[!] /usr/bin/git clone https://github.com/user/RWPodSpecs.git -- RWPodSpecs

fatal: destination path 'RWPodSpecs' already exists and is not an empty directory

and:

Validating spec
 -> RWPickFlavor (0.1.0)
    - NOTE  | url: The URL (https://github.com/user/RWPickFlavor) is not reachable.
    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/user/RWPickFlavor.git /var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a --template= --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/bw/h527d_4x6yb7rv3tdrldty1c0000gn/T/d20220525-6530-de485a'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
) during validation.

[!] The `RWPickFlavor.podspec` specification does not validate.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你怎么敢 2025-02-08 07:51:53

我遇到了这个问题,这是我如何解决的:

  1. 验证您在〜/documents/libraries/rwpickflavor目录中,然后在执行终端中的任何命令之前。
  2. 验证rwpickflavor.podspec的内容是否正确。我的不是,如果有问题,那么它将无法验证podspec。
  3. 我继续删除github上的远程存储库,然后ran rm -rf .git(同样,请确保您在〜/documents/librares/rwpickflavor)中。这个步骤可能太过分了,但是我认为当推到Github时,我错过了一些东西,而且由于这只是一个初始提交,所以我觉得它真的没有伤害任何事情。是的,我知道这不是关于版本控制的最佳练习。
  4. 然后,我继续在Github上重新创建了遥控库。
  5. 远程存储库再次可用,我进行了以下操作:
    • git Init
    • git add。
    • git commit -m“初始提交”
    • git标签0.1.0
    • git分支-m main
    • git Remote添加https://github.com/user/rwpickflavor.git
    • git push -u rigins main -tags
    • pod repo push rwpodspecs rwpickflavor.podspec

说明:我想我/我们可能已经在此过程中忘记了标签创建,也忘记将其包括在推送中。在删除远程存储库之前,我注意到没有标签,即使我添加了标签,podspec仍然无法验证。

希望这有帮助。

I had this very issue and here is how I resolved it:

  1. Verify you are in the ~/Documents/Libraries/RWPickFlavor directory before performing any commands in Terminal.
  2. Verify that the contents of RWPickFlavor.podspec are correct. Mine was not and, if something is wrong, then it will not validate the Podspec.
  3. I went ahead and deleted the remote repository on GitHub and then ran rm -rf .git (again, make sure you are in ~/Documents/Libraries/RWPickFlavor). This step might be excessive, but I figured I had missed something when pushing to GitHub and, since this was just an initial commit, I did not feel like it really harmed anything. Yes, I am aware this is not best practice with regards to version control.
  4. I then went ahead and recreated the remote repository on GitHub.
  5. With the remote repository once again available, I did the following:
    • git init
    • git add .
    • git commit -m "Initial commit"
    • git tag 0.1.0
    • git branch -M main
    • git remote add origin https://github.com/user/RWPickFlavor.git
    • git push -u origin main --tags
    • pod repo push RWPodSpecs RWPickFlavor.podspec

Explanation: I think I/we might have forgotten the tag creation in the process and also forgot to include it in the push. Before I deleted the remote repo, I noticed that there was no tag and, even if I added a tag, the Podspec still would not validate.

Hope this is helpful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文