{"id":1351,"date":"2021-03-14T23:26:51","date_gmt":"2021-03-14T14:26:51","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/?p=1351"},"modified":"2021-03-30T10:43:13","modified_gmt":"2021-03-30T01:43:13","slug":"post-1351","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2021\/03\/14\/post-1351\/","title":{"rendered":"SSH\u63a5\u7d9a\u3092\u5229\u7528\u3057\u3066CircleCI\u4e0a\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"
\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u306e\u30c7\u30d0\u30c3\u30b0\u3067\u306f\u306a\u304f\u3001SSH\u3092\u5229\u7528\u3057\u3066CircleCI\u30b3\u30f3\u30c6\u30ca\u3092\u76f4\u63a5\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u3068\u624b\u9593\u304c\u7701\u3051\u307e\u3059\u3002<\/p>\n
\u307e\u305a\u524d\u6e96\u5099\u3068\u3057\u3066\u3001SSH\u9375\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0(GitHub\u3082\u3057\u304f\u306fBitbucket)\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n
\u3053\u3053\u3067\u306fGitHub\u306e\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002
\n\u307e\u305a\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4efb\u610f\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n
$ ssh-keygen -t ed25519 -C "your_email@example.com"<\/code><\/pre>\nssh-agent\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n
$ eval "$(ssh-agent -s)"\n> Agent pid 59566<\/code><\/pre>\nssh-agent\u306b\u9375\u3092\u6e21\u3057\u307e\u3059\u3002<\/p>\n
$ ssh-add -K ~\/.ssh\/id_ed25519<\/code><\/pre>\n\u8a73\u3057\u304f\u306f\u65b0\u3057\u3044 SSH \u30ad\u30fc\u3092\u751f\u6210\u3057\u3066 ssh-agent \u306b\u8ffd\u52a0\u3059\u308b<\/a>\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002<\/p>\n\u4f5c\u6210\u3057\u305fSSH\u9375\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3059\u308b<\/h3>\n
\u516c\u958b\u9375\u60c5\u5831\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n
$ pbcopy < ~\/.ssh\/id_ed25519.pub<\/code><\/pre>\nGitHub\u306b\u5148\u307b\u3069\u30b3\u30d4\u30fc\u3057\u305f\u9375\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002
\n<\/p>\n
\u6700\u5f8c\u306b\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u6210\u529f\u3057\u305f\u65e8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8fd4\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n
\u276f ssh git@github.com\nHi :username! You've successfully authenticated...<\/code><\/pre>\n<\/p>\n
\u8a73\u3057\u304f\u306fGitHub \u30a2\u30ab\u30a6\u30f3\u30c8\u3078\u306e\u65b0\u3057\u3044 SSH \u30ad\u30fc\u306e\u8ffd\u52a0<\/a>\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002<\/p>\n\u30c7\u30d0\u30c3\u30b0\u624b\u9806<\/h2>\nReturn Job With SSH\u3092\u5b9f\u884c\u3059\u308b<\/h3>\n
\u5b9f\u969b\u306bSSH\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u3044\u30d3\u30eb\u30c9\u30b8\u30e7\u30d6\u306e\u753b\u9762\u304b\u3089\u300cReturn Job With SSH\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002
\n<\/p>\n
\u3059\u308b\u3068\u3001\u300cEnable SSH\u300d\u6b04\u5185\u306b\u3053\u306e\u30d3\u30eb\u30c9\u30b8\u30e7\u30d6\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308bSSH\u30b3\u30de\u30f3\u30c9\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002
\n<\/p>\n
\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u5b9f\u884c\u3059\u308b<\/h3>\n
\u524d\u9805\u3067\u51fa\u529b\u3055\u308c\u305fSSH\u30b3\u30de\u30f3\u30c9\u3092\u4efb\u610f\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002
\n<\/p>\n
\u4eca\u56de\u5229\u7528\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306fubuntu\u7cfb\u3060\u3063\u305f\u70ba\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u306froot@xxx\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002
\n\u305d\u3046\u3067\u306f\u306a\u304f\u3001\u4f8b\u3048\u3070\u30b3\u30f3\u30c6\u30ca\u304cCircleCI\u306e\u30d3\u30eb\u30c9\u6e08\u307fDocker\u30a4\u30e1\u30fc\u30b8<\/a>\u306e\u5834\u5408\u306fcircleci@xxx\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u304c\u3001\u3044\u305a\u308c\u306e\u5834\u5408\u3082\u6b63\u3057\u304f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u3066\u3044\u307e\u3059\u3002
\n
\n\u63a5\u7d9a\u306b\u6210\u529f\u3059\u308b\u3068\u3001\u305d\u306e\u65e8\u304c\u300cEnable SSH\u300d\u6b04\u306b\u8868\u8a18\u3055\u308c\u307e\u3059
\n<\/p>\n\u53c2\u8003<\/h2>\n
SSH \u3092\u4f7f\u7528\u3057\u305f\u30c7\u30d0\u30c3\u30b0<\/a>
\nCircleCI\u5b9f\u8df5\u5165\u9580\u2500\u2500CI\/CD\u304c\u3082\u305f\u3089\u3059\u958b\u767a\u901f\u5ea6\u3068\u54c1\u8cea\u306e\u4e21\u7acb (WEB+DB PRESS plus)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u306a\u305cSSH\u3092\u5229\u7528\u3057\u3066\u30c7\u30d0\u30c3\u30b0\u3057\u305f\u3044\u306e\u304b\uff1f \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u306e\u30c7\u30d0\u30c3\u30b0\u3067\u306f\u306a\u304f\u3001SSH\u3092\u5229\u7528\u3057\u3066CircleCI\u30b3\u30f3\u30c6\u30ca\u3092\u76f4\u63a5\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u3068\u624b\u9593\u304c\u7701\u3051\u307e\u3059\u3002 OS\u3084\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306e\u9055\u3044\u306a\u3069\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3068CI\u74b0\u5883\u306e\u5dee\u7570\u306b\u3088\u3063\u3066\u751f\u3058\u308b\u30a8\u30e9\u30fc\u306a\u3069\u3092\u518d\u73fe\u30fb\u89e3\u6c7a\u3057\u305f\u3044\u3002 CircleCI\u306e\u30d3\u30eb\u30c9\u30b3\u30f3\u30c6\u30ca\u4e0a\u306e\u74b0\u5883\u5909\u6570\u304c\u6b63\u3057\u304f\u8a2d\u5b9a\u3067\u304d\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u305f\u3044\u3002 SSH\u9375\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3059\u308b […]<\/p>\n","protected":false},"author":10,"featured_media":1354,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[44],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/1351"}],"collection":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=1351"}],"version-history":[{"count":14,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/1351\/revisions"}],"predecessor-version":[{"id":1404,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/1351\/revisions\/1404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media\/1354"}],"wp:attachment":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=1351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=1351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=1351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}