{"id":450,"date":"2018-01-30T07:14:17","date_gmt":"2018-01-30T07:14:17","guid":{"rendered":"http:\/\/www.asianux.org.vn\/?p=450"},"modified":"2018-01-30T07:14:17","modified_gmt":"2018-01-30T07:14:17","slug":"huong-dan-su-dung-ssh-key-bitbucket","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2018\/01\/30\/huong-dan-su-dung-ssh-key-bitbucket\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng SSH KEY + bitbucket"},"content":{"rendered":"<p>B\u01b0\u1edbc 1: Sinh key tr\u00ean m\u00e1y ch\u1ee9a m\u00e3 ngu\u1ed3n m\u00e0 b\u1ea1n mu\u1ed1n backup<\/p>\n<p>ssh-keygen -t rsa -b 4096 -C &#8220;khanhnnvn@gmail.com&#8221;<\/p>\n<p>B\u01b0\u1edbc 2: Key s\u1ebd l\u01b0u \u1edf \u0111\u01b0\u1eddng d\u1eabn m\u1eb7c \u0111\u1ecbnh:\u00a0\/root\/.ssh\/id_rsa.pub<\/p>\n<p>b\u1ea1n ki\u1ec3m tra key b\u1eb1ng l\u1ec7nh: cat\u00a0\u00a0\/root\/.ssh\/id_rsa.pub<\/p>\n<p>B\u01b0\u1edbc 3: B\u1ea1n copy key v\u00e0o t\u00e0i kho\u1ea3n\u00a0bitbucket nh\u01b0 h\u00ecnh d\u01b0\u1edbi \u0111\u00e2y.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-451\" src=\"http:\/\/www.asianux.org.vn\/wp-content\/uploads\/2018\/01\/Screenshot_1.png\" alt=\"\" width=\"660\" height=\"347\" title=\"\"><\/p>\n<p>B\u1ea1n d\u00f9ng l\u1ec7nh\u00a0ssh -T git@bitbucket.org \u0111\u1ec3 ki\u1ec3m tra vi\u1ec7c k\u1ebft n\u1ed1i.<\/p>\n<p>B\u01b0\u1edbc 4: Thay \u0111\u1ed5i url source t\u1eeb http sang ssh b\u1eb1ng l\u1ec7nh:<\/p>\n<p>git remote set-url origin git@bitbucket.org:tai_khoan\/ma_nguon.git<\/p>\n<p>ki\u1ec3m tra:<\/p>\n<p>git remote -v<\/p>\n<p>B\u01b0\u1edbc 5: \u0110\u1ec3 push code l\u00ean b\u1ea1n c\u00f3 th\u1ec3 d\u00f9ng l\u1ec7nh:<\/p>\n<p>git push origin master<\/p>\n<p>N\u1ebfu b\u1ea1n mu\u1ed1n add c\u00e1c ph\u1ea7n thay \u0111\u1ed5i th\u00ec d\u00f9ng c\u00e1c l\u1ec7nh sau:<\/p>\n<p>git add -A<\/p>\n<p>git commit -am &#8220;x&#8221;<\/p>\n<p>Sau \u0111\u00f3 \u0111\u1ea9y code l\u00ean.<\/p>\n<p>B\u1ea1n ho\u00e0n to\u00e0n c\u00f3 th\u1ec3 vi\u1ebft ch\u01b0\u01a1ng tr\u00ecnh t\u1ef1 \u0111\u1ed9ng \u0111\u1ec3 \u0111\u1ea9y vi\u1ec7c n\u00e0y h\u00e0ng ng\u00e0y b\u1eb1ng c\u00e1ch set crontab.<\/p>\n<p>Ch\u00fac b\u1ea1n th\u00e0nh c\u00f4ng.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>B\u01b0\u1edbc 1: Sinh key tr\u00ean m\u00e1y ch\u1ee9a m\u00e3 ngu\u1ed3n m\u00e0 b\u1ea1n mu\u1ed1n backup ssh-keygen -t rsa -b 4096 -C &#8220;khanhnnvn@gmail.com&#8221; B\u01b0\u1edbc 2: Key s\u1ebd l\u01b0u \u1edf \u0111\u01b0\u1eddng d\u1eabn m\u1eb7c \u0111\u1ecbnh:\u00a0\/root\/.ssh\/id_rsa.pub b\u1ea1n ki\u1ec3m tra key b\u1eb1ng&hellip;<\/p>\n","protected":false},"author":1,"featured_media":449,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-450","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programing"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=450"}],"version-history":[{"count":1,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/450\/revisions"}],"predecessor-version":[{"id":452,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/450\/revisions\/452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media\/449"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}