某天提交代碼出現(xiàn)
git@xxxxxx's password:
Permission denied, please try again.
git@xxxxxx's password:
Permission denied, please try again.
git@xxxxxx's password:
Permission denied, please try again.
輸入正確的密碼但是依然提示有問(wèn)題乎莉,檢查gitlab上SSH key也是有添加的挚冤,重新生成了一遍SSH key添加上鹏控,還是不行短绸,最終google發(fā)現(xiàn)了問(wèn)題
~/.ssh/config文件惹得禍,由于在生成SSH key的過(guò)程中沒(méi)有用默認(rèn)的文件名育苟,因?yàn)橐郧耙呀?jīng)生成過(guò)较鼓,特意用的新文件名稱,而這個(gè)新文件名稱并沒(méi)有加入到config文件中违柏,導(dǎo)致ssh key在ssh這一層根本不生效博烂,加入后立馬正常了
Host git.xxxxxx
IdentityFile ~/.ssh/id_ed25519_xxxx
User git