Help us understand the problem. What is going on with this article?

gitlabからsshでcloneできなかった話 (Mac OS Catalinaのバグ)

前提条件と解決策

前提条件

  • Mac OS Catalina 10.15.4 からlan外
  • 8192より大きいポートで
  • Domain nameを用いて

ssh接続しようとした時

解決策

  • Domain nameをnslookup等を使いipアドレスに書き換え

または

ssh -p <port> -oConnectTimeout=5 <user>@<servername>

参考

https://mjtsai.com/blog/2020/03/31/macos-10-15-4-broke-ssh/
https://discussions.apple.com/thread/251226509

発見経緯

gitlabからのsshを用いたcloneができなくてこの問題の発見に至りました。

ちなみに私の問題の場合は毎回git でcloneする場合に面倒だったのでgitの設定を

git config --local remote.origin.url "ssh://git@xxx.xxx.xxx.xxx:12345/<リポジトリpath>"

のような感じでipアドレスでの接続に変えることで解決しました。
(うっかり最初--globalでやってしまって大変な目に合ったのは内緒

Minato_seagull
某工業大学の修士卒
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした