我想使用git clone https://...
而不使用username
和password
,它不起作用在我的服务器上。没有用户名和密码的Git克隆
命令:sudo git clone https://gitlab.com/****/****.git
问题:他们问我的用户名和密码。
使用SSH,他们问我密码,我不想在git clone
之后输入内容。
任何想法?
编辑#1
命令:sudo ssh-keygen -p -P "myoldpassword" -n "" -f /root/.ssh/id_rsa.pub
结果:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/id_rsa.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa.pub
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/id_rsa.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa.pub
Bad passphrase.
如果它是一个私有的或其他访问受限制的存储库,除了配置SSH访问之外,您还可以做其他事情。你有这个功能吗? – Makoto
是的,这是一个私人存储库。是的,我启用了SSH,但有一个密码,我不希望他们... – tonymx227