PageSourceSearch

https://www.okteto.com/docs/assets/js/a691dc36.dae11a5e.js

js okteto.com collected 2026-10-02 03:15:02 UTC 8,175 bytes, 2 lines download raw bytes

1/*! For license information please see a691dc36.dae11a5e.js.LICENSE.txt */
2(self.webpackChunk_okteto_website_docs=self.webpackChunk_okteto_website_docs||[]).push([[6544],{22475:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});r(96540);var i=r(46942),n=r.n(i);const s="Image_BJUz",o="ImageCenter_fE7C",c="ImageBorderless_Quyg";var a=r(74848);const l=function(e){let{src:t,loading:r}=e;if(!t.match(/^((http|https):\/\/|\/)/)&&"undefined"!=typeof window){t=("/"+window.location.pathname.replace(/index\.[a-z]+$/,"").split("/").filter(Boolean).slice(0,-1).join("/")+"/"+t).replace(/\/{2,}/,"/")}const i=Object.assign({},e,{src:t,loading:r||"lazy",center:void 0,borderless:void 0});return(0,a.jsx)("img",Object.assign({},i,{className:n()(s,{[o]:e.center,[c]:e.borderless})}))}},28453:(e,t,r)=>{"use strict";r.d(t,{R:()=>o,x:()=>c});var i=r(96540);const n={},s=i.createContext(n);function o(e){const t=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),i.createElement(s.Provider,{value:t},e.children)}},46942:(e,t)=>{var r;!function(){"use strict";var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=o(e,s(r)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)i.call(e,r)&&e[r]&&(t=o(t,r));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},93260:(e,t,r)=>{"use strict";r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>g,frontMatter:()=>o,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"admin/registry-credentials/google-artifact-registry","title":"Google Artifact Registry","description":"Get Private Registry credentials from Google Artifact Registry","source":"@site/src/content/admin/registry-credentials/google-artifact-registry.mdx","sourceDirName":"admin/registry-credentials","slug":"/admin/registry-credentials/google-artifact-registry","permalink":"/docs/1.49/admin/registry-credentials/google-artifact-registry","draft":false,"unlisted":false,"editUrl":"https://github.com/okteto/docs/edit/main/src/content/admin/registry-credentials/google-artifact-registry.mdx","tags":[],"version":"current","frontMatter":{"title":"Google Artifact Registry","description":"Get Private Registry credentials from Google Artifact Registry","sidebar_label":"Google Artifact Registry","id":"google-artifact-registry"},"sidebar":"docs","previous":{"title":"DockerHub","permalink":"/docs/1.49/admin/registry-credentials/dockerhub"},"next":{"title":"Okteto API","permalink":"/docs/1.49/admin/okteto-api"}}');var n=r(74848),s=r(28453);r(22475);const o={title:"Google Artifact Registry",description:"Get Private Registry credentials from Google Artifact Registry",sidebar_label:"Google Artifact Registry",id:"google-artifact-registry"},c=void 0,a={},l=[{value:"Step 1: Create a service account with access to your private Google Artifact Registry",id:"step-1-create-a-service-account-with-access-to-your-private-google-artifact-registry",level:2},{value:"Step 2: Retrieve the service account credentials",id:"step-2-retrieve-the-service-account-credentials",level:2},{value:"Step 3: Configure the credentials in Okteto",id:"step-3-configure-the-credentials-in-okteto",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["This tutorial will guide you on how to use your private Google Artifact Registry with Okteto.\nIt's recommended that you have the ",(0,n.jsx)(t.a,{href:"https://cloud.google.com/sdk/docs/install",children:"gcloud CLI installed"})," to follow this tutorial."]}),"\n",(0,n.jsx)(t.p,{children:"The steps to configure your private Google Artifact Registry with Okteto are:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Create a service account with access to your private Google Artifact Registry"}),"\n",(0,n.jsx)(t.li,{children:"Retrieve the service account credentials"}),"\n",(0,n.jsx)(t.li,{children:"Configure the credentials in Okteto"}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"step-1-create-a-service-account-with-access-to-your-private-google-artifact-registry",children:"Step 1: Create a service account with access to your private Google Artifact Registry"}),"\n",(0,n.jsx)(t.p,{children:"Export the name your want to use for your service account:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"export SA_NAME=<<your-service-account-name>>\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Create a service account with the ",(0,n.jsx)(t.a,{href:"https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/create",children:"gcloud CLI"})," by executing the following command:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:'gcloud iam service-accounts create ${SA_NAME} --display-name="My Service Account for Okteto"\n'})}),"\n",(0,n.jsx)(t.p,{children:"Add a policy to grant read access to your private Google Artifact Registry:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"gcloud projects add-iam-policy-binding {PROJECT_ID} \\\n    --member=serviceAccount:{SA_NAME}@{PROJECT_ID}.iam.gserviceaccount.com \\\n    --role=roles/artifactregistry.reader\n"})}),"\n",(0,n.jsx)(t.h2,{id:"step-2-retrieve-the-service-account-credentials",children:"Step 2: Retrieve the service account credentials"}),"\n",(0,n.jsx)(t.p,{children:"Create an Access Key to use these credentials by executing the following command:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"gcloud iam service-accounts keys create SA_KEY_FILE.json \\\n    --iam-account=SA_NAME@PROJECT_ID.iam.gserviceaccount.com\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The command will create a file ",(0,n.jsx)(t.code,{children:"SA_KEY_FILE.json"})," with the required credentials. You will use this file in the next step."]}),"\n",(0,n.jsx)(t.h2,{id:"step-3-configure-the-credentials-in-okteto",children:"Step 3: Configure the credentials in Okteto"}),"\n",(0,n.jsxs)(t.p,{children:["Add the following registry credentials to the ",(0,n.jsx)(t.a,{href:"/docs/1.49/admin/registry-credentials/#add-registry-credentials",children:"Admin Registry Credentials view"})," in the Okteto Admin Dashboard:"]}),"\n",(0,n.jsxs)(t.p,{children:["Start by navigating to ",(0,n.jsx)(t.strong,{children:"Admin -> Registry Credentials"})," under the Integrations section."]}),"\n",(0,n.jsx)(t.p,{children:'Click "Add Credential" and use the following settings:'}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Type"}),": ",(0,n.jsx)(t.code,{children:"Static"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Hostname"}),": your private Google Artifact Registry endpoint, for example ",(0,n.jsx)(t.code,{children:"europe-west1-docker.pkg.dev"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Username"}),": ",(0,n.jsx)(t.code,{children:"_json_key"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"Password"}),": the content of the file ",(0,n.jsx)(t.code,{children:"SA_KEY_FILE.json"})]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["You can also use ",(0,n.jsx)(t.code,{children:"_json_key_base64"})," as ",(0,n.jsx)(t.code,{children:"username"})," and encode your ",(0,n.jsx)(t.code,{children:"SA_KEY_FILE.json"})," as the value of the ",(0,n.jsx)(t.code,{children:"password"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"cat SA_KEY_FILE.json | base64\n"})})]})}function g(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.