1. Git(Gerrit) 서버에 ssh public key를 등록했는데 Permission denied 에러가 발생할 때
thxxyj@personal-pc MINGW64 /my/workspace (my_branch)
$ git pull
thxxyj@my-gerrit-server: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[해결] .ssh/config에 PubkeyAcceptedAlgorithms +ssh-rsa 추가
thxxyj@personal-pc MINGW64 /my/workspace (my_branch)
$ git pull
From ssh://my-gerrit-server:29414/remote/project/name
77f5a10..85a1583 my_branch -> origin/ my_branch
Already up to date.
https://velog.io/@yjsworld/openssh-ssh-rsa-%EC%9D%B4%EC%8A%88
2. Git(Gerrit) 서버의 hooks/commit-msg 가 scp 되지 않을 때
thxxyj@personal-pc MINGW64 /my/workspace (my_branch)
$ gitdir=$(git rev-parse --git-dir); scp -p -P 29414 thxxyj@my-gerrit-server:hooks/commit-msg ${gitdir}/hooks/
subsystem request failed on channel 0
scp: Connection closed
thxxyj@personal-pc MINGW64 /my/workspace (my_branch)
$ echo $(git rev-parse --git-dir)
.git
[해결] scp 명령어에 -O 옵션 추가
https://stackoverflow.com/questions/74311661/subsystem-request-failed-on-channel-0-scp-connection-closed
thxxyj@personal-pc MINGW64 /my/workspace (my_branch)
$ gitdir=$(git rev-parse --git-dir); scp -p -O -P 29414 thxxyj@my-gerrit-server:hooks/commit-msg ${gitdir}/hooks/
commit-msg 100% 1792 384.7KB/s 00:00
'Git' 카테고리의 다른 글
git diff --name-status (0) | 2024.05.09 |
---|---|
가끔 쓰는 git config 명령어 (0) | 2023.09.19 |
[Git] 파일의 일부만 commit하기 (git add -p) (0) | 2022.10.08 |
하나의 PC에서 서로 다른 Github SSH public key 등록하기 (0) | 2022.10.07 |
[Git] git status (0) | 2022.09.25 |