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
OpenSSH RSA 공개 키를 이용한 서버 접속 에러 이슈 정리
SSH RSA 공개키 기반 접속 이슈 내용 정리이슈내용cicd서버에서 kca 운영 서버로 공개키 기반 접속이 가능했던 서버들은 ssh버전이 6.6으로 버전이 낮기 때문에 RSA키를 통하여 접근 가능. cicd 서버 버
velog.io
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 |