密码有时从github克隆!在里面

时间:2013-05-09 10:59:05

标签: linux git bash

我有一个密码!在它和我尝试使用以下语法从git克隆存储库时:

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

我收到此错误:

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

如何在不更改密码的情况下修复它?

我在Linux。我在Windows中使用过这个没有任何问题。

1 个答案:

答案 0 :(得分:8)

只是反斜杠感叹号。它在bash(历史扩展)中具有特殊意义。

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

您也可以将其包装成引号('):

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