我想從.bat
文件自動克隆回購。git克隆沉默不起作用
我使用ssh,所以.bat文件首先將「id_rsa
」文件移動到「user\.ssh
」文件夾。
然後,當我運行「git clone ssh://repo c:\repo
」,我得到這個問題
The authenticity of host can't be established.
RSA key fingerprint is ........
Are you sure you want to continue connecting (yes/no)?
如果我回答是手動它的工作原理,並在「user\.ssh
」文件夾中創建「known_hosts
」文件。現在,如果我運行.bat
文件,則git clone
將不會有問題。
我需要從.bat
文件中靜默地執行此操作。
我試圖從.bat
文件中回答yes
並添加「> /dev/nul 2>&1
」,但沒有成功。
任何想法?