다음 오류가 발생합니다 error: public key is not valid
.
[demo@nixos:~]$ nix-env -i ripgrep
installing 'ripgrep-0.10.0'
these paths will be fetched (0.00 MiB download, 4.76 MiB unpacked):
/nix/store/xgr3frnb5f13sf3ich8hl8lqbwjqngw9-ripgrep-0.10.0
error: public key is not valid
[demo@nixos:~]$ sudo nix-env -i ripgrep
installing 'ripgrep-0.10.0'
these paths will be fetched (0.00 MiB download, 4.76 MiB unpacked):
/nix/store/xgr3frnb5f13sf3ich8hl8lqbwjqngw9-ripgrep-0.10.0
error: public key is not valid
내 클라이언트 Nixos에는 다음과 같은 설정이 있습니다.
nix = {
binaryCaches = [
"https://cache.nixos.org/"
"http://192.168.56.1:8080"
];
binaryCachePublicKeys = [
"my-nix-cache:aDrIoY93RjzjnMmNYXlKSL3OerPqIGEiqv70CzwWzQvPejwp/89PN6FWkywTYqhjJ/muRT9cJHT4B8S+0pKCjw="
];
trustedUsers = [ "root" "chris" ];
};
nix-serve
내가하고있는 서버에서 :
NIX_SECRET_KEY_FILE="/etc/nixos/nixkeys/key.private" nix-serve -p 8080
2019/09/29-20:44:00 Starman::Server (type Net::Server::PreFork) starting! pid(17383)
Resolved [*]:8080 to [0.0.0.0]:8080, IPv4
Binding to TCP port 8080 on host 0.0.0.0 with IPv4
Setting gid to "100 100 1 17 27 67 100 131"
cat /etc/nixos/nixkeys/key.public
my-nix-cache:z3o8Kf/PTzehVpMsE2KoYyf5rkU/XCR0+AfEvtKSgo8=
답변1
나는 곧 깨달았다:
my-nix-cache:z3o8Kf/PTzehVpMsE2KoYyf5rkU/XCR0+AfEvtKSgo8=
문자열이 공개 키에 있는 것과 일치하지 않습니다.
my-nix-cache:aDrIoY93RjzjnMmNYXlKSL3OerPqIGEiqv70CzwWzQvPejwp/89PN6FWkywTYqhjJ/muRT9cJHT4B8S+0pKCjw=
...수정 후 잘 작동했습니다 :)
공개키 대신 개인키를 복사했어요!