Google

如何使用Cloud Shell連接自己的GitHub Repository教學

前言 由於懶懶最近發現Google的Cloud Shell跟Github Codespaces相當好用,平常使用Visual Studio Code的時機也只有編寫部落格的文章。 所以懶懶目前打算使用Cloud Shell連接自己的Git倉庫,然後把寫好的文章Git push到GitHub Repository上,這樣一來就能隨時在雲端操作編寫文章囉! Cloud Shell Cloud Shell https://shell.cloud.google.com/ Cloud Shell頁面 教學 登入你的Google帳戶後進入Cloud Shell,接著在Shell輸入中Github CLI指令登入Github 1 gh auth login Github CLI指令 選擇登入方式等等,請參考範例圖片 1 2 3 4 5 6 7 nullcode80625@cloudshell:~$ gh auth login ? What account do you want to log into? GitHub.com ? What is your preferred protocol for Git operations? HTTPS ? How would you like to authenticate GitHub CLI? Paste an authentication token Tip: you can generate a Personal Access Token here https://github.com/settings/tokens The minimum required scopes are 'repo', 'read:org', 'workflow'. ? Paste your authentication token: 登入方式 進入 https://github.com/settings/tokens 網頁,建立新token 建立新tokens 建立token名稱及權限,需給予repo, read:org, workflow之權限 建立名稱 選擇所需權限 ...

2023年3月13日 · 1 分鐘 · 111 字 · 懶懶