
我使用沒有密碼的使用者設定我的 git 伺服器git
。
git
主目錄是我有一個帶有我的公鑰的/media/nas/programming/git_repos
檔案的地方。./.ssh/authorized_keys
我試圖git-gui
從 Windows 中推送,但沒有成功。它要求輸入密碼。
現在我嘗試使用 ssh 連接,互動式對話框是:ssh -T [email protected]
C:\Program Files\Git\cmd>ssh -T [email protected]
Enter passphrase for key 'C:\Users\chameleon/.ssh/id_rsa':
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied, please try again.
好的,這個密碼是什麼?git
用戶沒有密碼。我正確設定了密碼(否則會再次詢問)。
答案1
我忘記在伺服器端向 ssh 守護程序的允許用戶添加新用戶git
。這可以透過在伺服器上的檔案git
中新增使用者來實現。AllowUsers
/etc/ssh/sshd_config
之後,ssh 和 git 客戶端的問題都得到解決。