首页 > 解决方案 > Pod repo push for private repo 遇到错误:找不到存储库

问题描述

我正在我的私人仓库中设置我的第一个 cocoapod,但是在尝试运行时pod repo push my-specs mypod.podspec,我 fatal: repository 'https://github.com/myusername/repo.git/'找不到

这是一个私有的内部 iOS 代码库,我正在模块化以通过 cocoapods 重用和安装

这是我的 .podspec:

Pod::Spec.new do |s|
  s.name             = 'podname'
  s.version          = '1.0.1'
  s.summary          = 'A short description'

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://github.com/username/repo'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'username' => 'email@address.com' }
  s.source           = { :git => 'https://github.com/username/repo.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '8.0'

  s.source_files = 'podname/Classes/**/*'

end

我试图推动回购的是

 -> podname (1.0.1)
    - WARN  | summary: The summary is not meaningful.
    - WARN  | url: The URL (https://github.com/username/repo) is not reachable.
    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/username/repo.git /var/folders/mp/3ny_fkts3p11rwpry385gqb80000gn/T/d20190510-71011-gu0kly --template= --single-branch --depth 1 --branch 1.0.1

Cloning into '/var/folders/mp/3ny_fkts3p11rwpry385gqb80000gn/T/d20190510-71011-gu0kly'...
remote: Repository not found.
fatal: repository 'https://github.com/username/repo.git/' not found
) during validation.

[!] The 'podname.podspec' specification does not validate.

标签: iosgithubcocoapodspodspec

解决方案


需要有一个真正的回购s.source


推荐阅读