

{"id":395,"date":"2015-02-27T20:26:02","date_gmt":"2015-02-27T11:26:02","guid":{"rendered":"https:\/\/curecode.jp\/tech\/?p=395"},"modified":"2015-08-01T11:43:41","modified_gmt":"2015-08-01T02:43:41","slug":"gitlab-authorized_keys-out-of-sync","status":"publish","type":"post","link":"https:\/\/curecode.jp\/tech\/gitlab-authorized_keys-out-of-sync\/","title":{"rendered":"GitLab \u306e authorized_keys \u304c\u540c\u671f\u3055\u308c\u306a\u3044"},"content":{"rendered":"<p>\nGitLab\u306e \u30b5\u30fc\u30d0\u306b\u5bfe\u3057\u3066 <code>git<\/code> \u30b3\u30de\u30f3\u30c9\u304c\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u73fe\u8c61\u304c\u8d77\u304d\u307e\u3057\u305f\u3002\n<\/p>\n<pre><code class=\"shell\">\r\n$ git pull origin\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\nfatal: The remote end hung up unexpectedly\r\n<\/code><\/pre>\n<p>\n  GitLab \u306e web \u753b\u9762\u3067\u898b\u308b\u3068\u3001ssh \u306e\u516c\u958b\u9375\u306f\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n  \u3057\u304b\u3057\u3001\u8a66\u3057\u306b\u9375\u3092\u524a\u9664\u3057\u3066\u518d\u767b\u9332\u3057\u3066\u3082\u3001GitLab \u30b5\u30fc\u30d0\u306e git \u30e6\u30fc\u30b6\u306e .ssh\/authorized_keys \u304c\u66f4\u65b0\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u7279\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u8a2d\u5b9a\u306b\u3082\u554f\u984c\u306f\u3042\u308a\u307e\u305b\u3093\u3002\n<\/p>\n<p>\n  \u539f\u56e0\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u58ca\u308c\u3066\u540c\u671f\u3057\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u3088\u3046\u3067\u3059\u3002\u4fee\u5fa9\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u624b\u52d5\u3067\u66f4\u65b0\u3057\u3066\u306f\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n  \u305d\u3053\u3067\u3001\u5f37\u5236\u7684\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067 authorized_keys \u3092\u4f5c\u308a\u76f4\u3057\u307e\u3059\u3002\u3053\u308c\u3067 GitLab \u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u516c\u958b\u9375\u304c\u66f8\u304d\u51fa\u3055\u308c\u307e\u3059\u3002\u65e2\u5b58\u306e .ssh\/authorized_keys \u30d5\u30a1\u30a4\u30eb\u306f\u4e0a\u66f8\u304d\u3055\u308c\u308b\u306e\u3067\u5ff5\u306e\u305f\u3081\u306b\u4e8b\u524d\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\n<\/p>\n<pre><code class=\"shell\">\r\n$ bundle exec rake gitlab:shell:setup RAILS_ENV=production\r\nThis will rebuild an authorized_keys file.\r\nYou will lose any data stored in authorized_keys file.\r\nDo you want to continue (yes\/no)? yes\r\n<\/code><\/pre>\n<p>\n  \u518d\u4f5c\u6210\u3055\u308c\u305f .ssh\/authorized_keys \u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3001\u65b0\u3057\u304f\u767b\u9332\u3057\u305f\u516c\u958b\u9375\u3082\u66f8\u304d\u51fa\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3067 git pull \u30b3\u30de\u30f3\u30c9\u3082\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002\n<\/p>\n<h3>IT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u4e2d\uff01<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u52df\u96c6\u3057\u3066\u304a\u308a\u307e\u3059\u3002\u5c11\u4eba\u6570\u306e\u8077\u5834\u306a\u306e\u3067\u3001\u4e0a\u6d41\u30fb\u4e0b\u6d41\u3084\u30b5\u30fc\u30d0\u30fc\u30fb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5bfe\u5fdc\u306e\u57a3\u6839\u306a\u304f\u3001\u3042\u306a\u305f\u306e\u5f37\u307f\u3092\u6d3b\u304b\u3057\u306a\u304c\u3089 \u3044\u308d\u3044\u308d\u306a\u3053\u3068\u306b\u30c1\u30e3\u30ec\u30f3\u30b8\u53ef\u80fd\u3067\u3059\u3002\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u672a\u7d4c\u9a13\u306e\u65b9\u3001\u7d4c\u9a13\u304c\u5c11\u306a\u3044\u65b9\u3082\u6b53\u8fce\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u3088\u308aIT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u306e\u63a1\u7528\u60c5\u5831\u3092\u3054\u89a7\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/curecode.jp\/recruit\/itengineer\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/it_recruit.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n<h3>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u516c\u5f0f\u30a4\u30f3\u30b9\u30bf\u30b0\u30e9\u30e0<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306e\u65b0\u30b5\u30fc\u30d3\u30b9\u60c5\u5831\u3084\u3001\u30aa\u30d5\u30a3\u30b9\u30e9\u30a4\u30d5\u306e\u7d20\u6575\u306a\u77ac\u9593\u307e\u3067\u3002\u79c1\u305f\u3061\u306e\u65e5\u3005\u306e\u55b6\u307f\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/www.instagram.com\/curecode\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/insta_bn.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>GitLab\u306e \u30b5\u30fc\u30d0\u306b\u5bfe\u3057\u3066 git \u30b3\u30de\u30f3\u30c9\u304c\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u73fe\u8c61\u304c\u8d77\u304d\u307e\u3057\u305f\u3002 $ git [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":397,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[44,45,46],"class_list":["post-395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-git","tag-gitlab","tag-ssh"],"_links":{"self":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":2,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":398,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/395\/revisions\/398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media\/397"}],"wp:attachment":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}