具体用法不说了,很多,请自行搜索,比github插件啥的好用多了。
日期: 2020年10月10日
以docker的方式运行composer时报sh: git: not found
操作系统:ubuntu20
环境:https://github.com/yeszao/dnmp
在宿主机本地安装的jenkins,在jenkins中设置job,composer install,截取部分输出如下:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 8 installs, 0 updates, 0 removals
- Installing sebastian/code-unit-reverse-lookup (2.0.2): Downloading (connecting...)Downloading (100%) Failed to download sebastian/code-unit-reverse-lookup from dist: /tmp/composer/cache/files/sebastian/code-unit-reverse-lookup does not exist and could not be created.
Now trying to download from source
- Installing sebastian/code-unit-reverse-lookup (2.0.2): Cloning ee51f9bb0c
[RuntimeException]
Failed to clone https://github.com/sebastianbergmann/code-unit-reverse-lookup.git, git was not found, check that it is installed and in your PATH env.
sh: git: not found
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
skipping non-regular file "vendor/bin/carbon"
skipping non-regular file "vendor/bin/commonmark"
skipping non-regular file "vendor/bin/php-parse"
skipping non-regular file "vendor/bin/psysh"
skipping non-regular file "vendor/bin/var-dump-server"
Finished: SUCCESS
直接在宿主机进到相应的项目目录执行composer install显示:
Cannot create cache directory /tmp/composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /tmp/composer/cache/files/, or directory is not writable. Proceeding without cache
[Composer\Downloader\TransportException]
Content-Length mismatch, received 44625 bytes out of the expected 604017
require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
这里的composer命令是通过在.bashrc中添加以下命令实现的:
# php7 composer
composer () {
tty=
tty -s && tty=--tty
docker run \
$tty \
--interactive \
--rm \
--user www-data:www-data \
--volume ~/dnmp/data/composer:/tmp/composer \
--volume $(pwd):/app \
--workdir /app \
dnmp_php composer "$@"
}
提示找不到git,但显然是存在的,搜索发现可能是权限问题,就给~/dnmp/data/composer,还有/var/lib/jenkins/workspace目录改成777,问题解决。
卢沟桥




晚上去右岸的时候,发现有人在那里做直播,聊了记录看桥的那些人员很多,倒是没问他是哪个平台,弄个手机拍月亮,效果实在很差。
最近在研究房车
作为工薪阶层,本来是不应该考虑房车的,因为没有多少时间出去,但越是这样,就越是想出去,如果换个角度思考,房车本来就是周末度假的一种方式,那就让周末过的更有质量不也挺好的吗?当然,目前还没有这个预算,就算有了预算也没有资金。
不过这并不阻碍继续研究,除了挣钱这个命题另外考虑,在假定有钱的情况下还需要考虑以下几个问题:
买什么车型更合适,B型还是C型,六座六卧还是六座四卧。
车停靠在什么地方,小区里的临时车位能不能长期停。
最关键的一个问题是,以北京为中心,周末房车自驾到底能去哪些地方,还要考虑周末要错开孩子上培训班的时间。活动半径在100公里到400公里这个范围。
