其实我一直在想,这个功能什么时候会被关掉。
开始:
用cloudflare tunnel的时候,从没想过会在macos上出问题,如果你直接cloudflared service install,不会运行,即使你sudo了也不会,因为这个运行的只是cloudflared,并不带任何参数。
需要在相应的plist下面加上<string>tunnel</string><string>run</string>才OK。
加之前需要先unload,然后再load。否则无效。
其他都与官方一致。
---
如果用sudo了。需要将~/.cloudflared/下的内容copy到/etc/cloudflared下面。如果不放心或者担心没权限,可以修改uuid.json,将路径改为/etc/cloudflared/。其他照旧
记得配合一下valet,因为valet tld之后,子域名的映射会比较方便。
而且valet也支持multi php version。
---EOF
远程操作家里的mac mini进行更新的时候,突然报错:
XML/HTML代码
- mini:Homebrew mini$ brew update
- Warning: No available formula with the name "ca-certificates".
- ==> Searching for similarly named formulae...
- Error: No similarly named formulae found.
- ==> Searching for a previously deleted formula (in the last month)...
- Warning: homebrew/core is shallow clone. To get its complete history, run:
- git -C "$(brew --repo homebrew/core)" fetch --unshallow
-
- Error: No previously deleted formula found.
- ==> Searching taps on GitHub...
- Error: No formulae found in taps.
- Error:
- homebrew-core is a shallow clone.
- To `brew update`, first run:
- git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
- This command may take a few minutes to run due to the large size of the repository.
- This restriction has been made on GitHub's request because updating shallow
- clones is an extremely expensive operation due to the tree layout and traffic of
- Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
- automatically to avoid repeatedly performing an expensive unshallow operation in
- CI systems (which should instead be fixed to not use shallow clones). Sorry for
- the inconvenience!
于是执行
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow ,然而执行下来还是:
XML/HTML代码
- error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
- fatal: the remote end hung up unexpectedly
然后我就用打开git trace进行查看:
XML/HTML代码
- GIT_TRACE=2 git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
- 10:29:28.798061 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/bin/git
- 10:29:28.798668 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/bin
- 10:29:28.799328 git.c:418 trace: built-in: git fetch --unshallow
- 10:29:28.801482 run-command.c:643 trace: run_command: GIT_DIR=.git git-remote-https origin https://mirrors.ustc.edu.cn/homebrew-core.git
- 10:29:28.812513 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-remote-https
- 10:29:28.813122 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core
- 10:29:28.929816 run-command.c:643 trace: run_command: git fetch-pack --stateless-rpc --stdin --lock-pack --include-tag --thin --depth=2147483647 https://mirrors.ustc.edu.cn/homebrew-core.git/
- 10:29:28.935164 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git
- 10:29:28.935863 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core
- 10:29:28.936585 git.c:418 trace: built-in: git fetch-pack --stateless-rpc --stdin --lock-pack --include-tag --thin --depth=2147483647 https://mirrors.ustc.edu.cn/homebrew-core.git/
- error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
- fatal: the remote end hung up unexpectedly
这个。。--depth=2147483647,居然这么深?
---
在非正常之前,做了不少操作,比如用官方的uninstall脚本清除了系统,然而也没有什么用。所幸,现在正常了。