BER分博客 - 2026年2月 一个潇洒的博客 2026-02-13T10:22:00+00:00 Typecho https://blog.berfen.com/feed/atom/2026/02/ <![CDATA[彻底解决 macOS "git-credential-osxkeychain 想要访问钥匙串" 弹窗问题]]> https://blog.berfen.com/post/60.html 2026-02-13T10:22:00+00:00 2026-02-13T10:22:00+00:00 taotecode https://blog.berfen.com 问题现象

在 macOS 系统中使用 Git 时,经常会遇到一个令人困扰的弹窗:

"git-credential-osxkeychain" 想要访问你的钥匙串中的密钥 "gitlab.xxx.cloud"

更糟糕的是,当你打开"钥匙串访问"应用尝试删除这个凭证时,却发现:

  • 找不到对应的条目
  • 或者删除后弹窗依然出现
  • 甚至删除按钮是灰色的,无法操作

这个问题的根本原因是 Git 凭证存储在 macOS 钥匙串中,但权限配置出现了异常,导致 git-credential-osxkeychain 工具无法正常访问凭证。

[...]

]]>
<![CDATA[Linux 策略路由与接口绑定问题深度剖析:为什么 ping -I eno1 会失败?]]> https://blog.berfen.com/post/59.html 2026-02-13T09:37:31+00:00 2026-02-13T09:37:31+00:00 taotecode https://blog.berfen.com Linux 策略路由与接口绑定问题深度剖析:为什么 ping -I eno1 会失败?

问题背景

在实现静态 IP 多网卡策略路由时,遇到了一个令人困惑的问题:使用 ping -I 192.168.20.10(指定源 IP)可以正常访问外网,但使用 ping -I eno1(指定网卡接口)却完全无法连通。这个问题看似简单,实则涉及 Linux 内核路由查找机制、策略路由、反向路径过滤等多个底层技术细节。

[...]

]]>
<![CDATA[macOS 环境下 PHP-FPM 连接 PostgreSQL 时崩溃(502 Bad Gateway)的排查与解决]]> https://blog.berfen.com/post/58.html 2026-02-07T05:58:00+00:00 2026-02-07T05:58:00+00:00 taotecode https://blog.berfen.com 问题描述

在 macOS 开发环境中,使用 Homebrew 安装的 PHP 8.2 + PHP-FPM 连接远程 PostgreSQL 数据库时,频繁出现 502 Bad Gateway 错误。

症状特征

  • CLI 模式完全正常:php artisan tinker 或直接运行 PHP 脚本都能成功连接
  • PHP-FPM 模式崩溃:通过 Nginx 访问时,PHP-FPM worker 进程会崩溃
  • Linux 服务器正常:相同的代码在 Linux 生产服务器上运行完全正常
  • 间歇性发生:有时能成功,有时失败,重启 PHP-FPM 后短暂恢复
  • 并发时更容易触发:多个请求同时访问时崩溃概率更高

[...]

]]>