使用 Git 克隆时提供用户名和电子邮件
Providing username with email when using Git clone
我想克隆一个使用 ssh 的存储库。为此,我需要输入我的用户名。我已尝试根据 How to provide username and password when run "git clone git@remote.git"? 执行此操作。但是,我的用户名中有@,这似乎与命令混淆。
我当前没有输入用户名的命令是sudo git clone ssh://git@git.x/y/
。现在我想做同样的事情,但使用我的用户名 abc@gmail.com。我该怎么做?
如果我尝试写 sudo git clone abc@gmail.com@git.x/y/
,我会得到错误 repository abc@gmail.com@git.x/y/ does not exist
Url-对您的用户名进行编码,将“@”替换为“%40”。
我想克隆一个使用 ssh 的存储库。为此,我需要输入我的用户名。我已尝试根据 How to provide username and password when run "git clone git@remote.git"? 执行此操作。但是,我的用户名中有@,这似乎与命令混淆。
我当前没有输入用户名的命令是sudo git clone ssh://git@git.x/y/
。现在我想做同样的事情,但使用我的用户名 abc@gmail.com。我该怎么做?
如果我尝试写 sudo git clone abc@gmail.com@git.x/y/
,我会得到错误 repository abc@gmail.com@git.x/y/ does not exist
Url-对您的用户名进行编码,将“@”替换为“%40”。