1

! を含むパスワードを持っています。その中で、次の構文を使用して git からリポジトリを複製しようとしている場合:

  git clone https://username:password!@github.com/org/repository.git

このエラーが発生しています:

 bash: !@github.com/org/repository.git: event not found

パスワードを変更せずに修正するにはどうすればよいですか?

私はLinuxにいます。これをWindowsで問題なく使用しました。

4

1 に答える 1

11

感嘆符をバックスラッシュするだけです。bash では特別な意味があります (履歴の展開)。

git clone https://username:password\!@github.com/org/repository.git

重引用符 ( ')で囲むこともできます。

git clone 'https://username:password!@github.com/org/repository.git'
于 2013-05-09T11:00:47.667 に答える