在ubuntu上配置了gitLab,在custom_hooks自定義鈎子中,post-receive中,對應GitLab中的私庫,clone等都需要驗證(http方式需要輸入用戶名和密碼,SSH的方式這里先不討論)
,出現了could not read Username for 'ip地址':No such device or address
原因
.git目錄下的config文件中沒有用戶身份信息
解決方法:
在請求串中加入身份信息即可,格式為:
https://[userName]:[password]@github.com/[username]/project.git