小白兔晒黑了

导航

 

1 submit

 注意:先要FQ,不然不能登录的。。。。。

登录 https://packagist.org/

This package is not auto-updated. Please set up the GitHub Hook for Packagist so that it gets updated whenever you push! 如果出现这行,说明你没有设置钩子自动更新代码。

2 设置钩子

2.1 查看你的token

https://packagist.org/profile/

 

 

 

 

2.2  Add webhook

https://github.com/guainttt/cattree/settings

Payload URL格式:https://packagist.org/api/bitbucket?username=你在packagist里的用户名&apiToken=在packagist里获取的token

 

3 踩坑

3.1 坑1 composer require时报错

[InvalidArgumentException]                                                                                     
  Could not find a version of package guainttt/cattree matching your minimum-stability (stable). Require it wit  
  h an explicit version constraint allowing its desired stability. 

我本来还以为是我的composer.json 安全级别,改成"minimum-stability": "stable" 依旧报错。太坑了!! 其实是我git没设置tag

坑1 解决办法

 git tag v1.0
git push origin v1.0

坑2 Could not find package

坑2 解决办法

不要使用国内镜像 设置回 https://packagist.org

composer config -g repo.packagist composer https://packagist.org

然后别忘了打开你的梯子。。

 

ps:

如果你没有配置自动更新 也可以手动更新。。。

 我的成品

https://packagist.org/packages/guainttt/cattree

posted on 2021-03-08 20:13  小白兔晒黑了  阅读(269)  评论(0编辑  收藏  举报