简体   繁体   English

git 从脚本克隆

[英]git clone from script

How can I run 'git clone' from script so it won't prompt for my password?如何从脚本运行“git clone”,这样它就不会提示我输入密码?

Is there some way, like entering the password on the same line with git clone?有没有办法,比如在 git 克隆的同一行输入密码?

(I have my own git repository. Not github) (我有自己的 git 存储库。不是 github)

This is about configuring passwordless ssh access to a server, if I understand correctly.这是关于配置无密码 ssh 访问服务器,如果我理解正确的话。 Then you will only need to run your script on the machine and under the user that can access this server passwordlessly ( possibly creating a specific limited ssh key for the use of this script ).然后你只需要在机器上和可以无密码访问这个服务器的用户下运行你的脚本( 可能创建一个特定的受限 ssh 密钥来使用这个脚本)。

You can google for passwordless ssh , look at this previous similar question , or look at how github advises its users to proceed , and adapt this to your server.您可以在Google 上搜索无密码 ssh ,查看之前的类似问题,或查看 github 如何建议其用户继续操作,并将其适应您的服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM