{"id":1754,"date":"2021-09-23T16:45:26","date_gmt":"2021-09-23T16:45:26","guid":{"rendered":"https:\/\/blog.samarthya.me\/wps\/?p=1754"},"modified":"2021-09-23T16:45:30","modified_gmt":"2021-09-23T16:45:30","slug":"personal-access-token","status":"publish","type":"post","link":"https:\/\/blog.samarthya.me\/wps\/2021\/09\/23\/personal-access-token\/","title":{"rendered":"Personal Access Token"},"content":{"rendered":"\n<p>In case you are still using the basic\/auth it is time to move to personal access token.<\/p>\n\n\n\n<figure class=\"wp-block-pullquote is-style-solid-color\"><blockquote><p><a href=\"https:\/\/docs.github.com\/en\/enterprise-server@3.1\/authentication\/keeping-your-account-and-data-secure\/creating-a-personal-access-token\" data-type=\"URL\" data-id=\"https:\/\/docs.github.com\/en\/enterprise-server@3.1\/authentication\/keeping-your-account-and-data-secure\/creating-a-personal-access-token\">Official documentation<\/a> is the best guide.<\/p><\/blockquote><\/figure>\n\n\n\n<p>Personal access tokens (PATs) are an alternative to using <code>passwords<\/code> for authentication to GitHub Enterprise Server when using the\u00a0<a href=\"https:\/\/docs.github.com\/en\/enterprise-server@3.1\/rest\/overview\/other-authentication-methods#via-oauth-and-personal-access-tokens\">GitHub API<\/a>\u00a0or the\u00a0<a href=\"https:\/\/docs.github.com\/en\/enterprise-server@3.1\/authentication\/keeping-your-account-and-data-secure\/creating-a-personal-access-token#using-a-token-on-the-command-line\">command line<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1:<\/h2>\n\n\n\n<p>Go to the settings from the <\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"338\" height=\"98\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.07.40-PM.png\" alt=\"\" class=\"wp-image-1756\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.07.40-PM.png 338w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.07.40-PM-300x87.png 300w\" sizes=\"(max-width: 338px) 100vw, 338px\" \/><figcaption>top right<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"362\" height=\"952\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.07.00-PM.png\" alt=\"\" class=\"wp-image-1755\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.07.00-PM.png 362w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.07.00-PM-114x300.png 114w\" sizes=\"(max-width: 362px) 100vw, 362px\" \/><\/figure><\/div>\n\n\n\n<p>Once you navigate into settings, you have to select<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"486\" height=\"126\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.08.46-PM.png\" alt=\"\" class=\"wp-image-1757\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.08.46-PM.png 486w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.08.46-PM-300x78.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"155\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.09.31-PM-1024x155.png\" alt=\"\" class=\"wp-image-1758\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.09.31-PM-1024x155.png 1024w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.09.31-PM-300x45.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.09.31-PM-768x116.png 768w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.09.31-PM-1536x233.png 1536w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.09.31-PM-2048x310.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Select Personal access tokens, and then click <code>Generate new token<\/code> in the next scren<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"84\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.10.47-PM-1024x84.png\" alt=\"\" class=\"wp-image-1759\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.10.47-PM-1024x84.png 1024w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.10.47-PM-300x25.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.10.47-PM-768x63.png 768w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.10.47-PM.png 1532w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Select the appropriate name and scope for the token.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"1024\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.02-PM-832x1024.png\" alt=\"\" class=\"wp-image-1760\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.02-PM-832x1024.png 832w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.02-PM-244x300.png 244w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.02-PM-768x945.png 768w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.02-PM-1248x1536.png 1248w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.02-PM.png 1506w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/figure>\n\n\n\n<p>Once you are done click <code>Generate<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"163\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.46-PM-1024x163.png\" alt=\"\" class=\"wp-image-1761\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.46-PM-1024x163.png 1024w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.46-PM-300x48.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.46-PM-768x122.png 768w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2021\/09\/Screenshot-2021-09-23-at-10.12.46-PM.png 1512w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once added you can use that as part of the <code>scm<\/code> plugin in the main pom, or use it in the <code>settings.xml<\/code>. In my case I am using it in <code>server.xml<\/code> but need to add the property <code>project.scm.id<\/code> so that you refer the credentials.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;project.scm.id>github.com&lt;\/project.scm.id><\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case you are still using the basic\/auth it is time to move to personal access token. Official documentation is the best guide. Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub Enterprise Server when using the\u00a0GitHub API\u00a0or the\u00a0command line. Step 1: Go to the settings from the Once you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[34],"tags":[194,193],"class_list":["post-1754","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-technical","tag-github","tag-pat","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/1754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/comments?post=1754"}],"version-history":[{"count":0,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/1754\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media\/1762"}],"wp:attachment":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media?parent=1754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/categories?post=1754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/tags?post=1754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}