1

I have a new M1 MacBook Pro (Monterey 12.5) and installed Homebrew and the CLI Developer tools (13.4). Anytime I use ssh to communicate with a git remote repository, I receive the following:

dlopen /usr/local/lib/libykcs11.dylib failed: (null)

For clone operations the error seems innocuous and the clone completes. However, if the remote repository changes and I do a git fetch --all I receive the above message, but the fetch is not performed. If I access the remote repository via https all works.

I see the above behavior regardless if I use the Xcode Developer Tools git (version 2.32.1 (Apple Git-133)) or a new version from Homebrew (version 2.37.1).

I have uninstalled and reinstalled the Developer CLI Tools. What is perplexing is I have 24" M1 iMac with macOS 12.5 and the 13.4 Developer Tools CLI that does not exhibit this behavior.

How do I debug this further?

4
  • 1
    What does which git show?
    – mmmmmm
    Aug 9, 2022 at 16:40
  • When using CLI Developer Tools only: it's /usr/bin/git with homebrew it's /opt/homebrew/bin/git.
    – grolfs
    Aug 9, 2022 at 17:07
  • Have you got anything in /usr/local ?
    – mmmmmm
    Aug 9, 2022 at 17:10
  • No /usr/local/lib directory. My company uses jamf so there is a /usr/local/jamf and /usr/local/bin/jamf and /usr/local/bin/terminal-notifier.
    – grolfs
    Aug 9, 2022 at 17:23

1 Answer 1

1

Well, I finally found it. I was editing my ~/.ssh/config for other reasons and I found the following entry for our internal GitHub Enterprise repository:

Host <our internal repo>
  PKCS11Provider /usr/local/lib/libykcs11.dylib
  Port 22
  User git

After various macOS upgrades and Homebrew updates, I no longer had this library. Removing the PKCS11Provider entry has resolved my issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .