创建私有仓库中踩过的坑

作者: Ashen_ | 来源:发表于2016-10-27 15:52 被阅读4490次

    1. [!] The `master` repo is not a git repo.

    // 终端输入以下命令
    rm-rf~/.cocoapods
    pod setup
    

    2.[!] podRoutes1 did not pass validation, due to 1 warning (but you can use `--allow-warnings` to ignore it)

    // 忽略警告
    pod lib lint --allow-warnings
    

    3.[!] The podspec does not validate.

    原因很多,通过追加--verbose参数查看具体原因
    // 在命令行后面添加 --verbose
    pod trunk push SJFormatTextField.podspec --verbose
    // 如果处在错误,则会详细注明,例如
    warning: Could not find remote branch 0.0.1 to clone.
    fatal: Remote branch 0.0.1 not found in upstream origin
    
    eg:
    // ERROR | [iOS] file patterns: The `source_files` pattern did not match any file.
    确认source_files的匹配是否成功,可以用*.*模糊匹配
    

    4.remote: Permission to HH-Medic/HHJumpRoutes.git denied to 515783034.fatal: unable to access 'https://github.com/HH-Medic/HHJumpRoutes.git/': The requested URL returned error: 403

    //没有访问权限,修改下git/config
    url = https://github.com/HH-Medic/HHJumpRoutes.git
    url = https://HH-Medic@github.com/HH-Medic/HHJumpRoutes.git // 添加账户即可,第一次会让你输入账号的密码
    

    5 .Unable to find a pod with name matching (or pod search时提示查找不到)

    // 更新一下本地缓存的框架
    pod repo remove master
    

    6.Unable to find a specification for 'HHCoreFramework'

    // 可能原因:podspec文件配置错误, 注意查看以下问题等
    1. 单引号的问题;
    2. 源文件路径;
    

    6.Could not find remote branch 1.0.1 to clone.

    // 找不到对应的tag
    1. 是否push 了tag; 
    2. podspec中是否修改了对应的tag;  
    git push --tags
    s.version = "1.1.5"
    
    

    相关文章

      网友评论

        本文标题:创建私有仓库中踩过的坑

        本文链接:https://www.haomeiwen.com/subject/eiqsuttx.html