fix: Add GitHub authentication cell for private repo
- Add cell 1 for token input (getpass) - Update clone command to use token from environment - Now 3 cells: auth, setup, start
This commit is contained in:
parent
1580a6a925
commit
90c553280d
1 changed files with 30 additions and 2 deletions
|
|
@ -11,8 +11,13 @@
|
|||
"# Setup: Clone repo and build frontend\n",
|
||||
"# ===========================================\n",
|
||||
"\n",
|
||||
"# Clone repository\n",
|
||||
"!git clone https://github.com/unslothai/new-ui-prototype.git\n",
|
||||
"# Clone repository with GitHub token\n",
|
||||
"import os\n",
|
||||
"github_token = os.environ.get('GITHUB_TOKEN', '')\n",
|
||||
"if github_token:\n",
|
||||
" !git clone https://{github_token}@github.com/unslothai/new-ui-prototype.git\n",
|
||||
"else:\n",
|
||||
" !git clone https://github.com/unslothai/new-ui-prototype.git\n",
|
||||
"%cd /content/new-ui-prototype\n",
|
||||
"\n",
|
||||
"# Install Node.js 20.x\n",
|
||||
|
|
@ -34,6 +39,29 @@
|
|||
"print(\"✅ Python dependencies installed\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "26b0e164",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# ===========================================\n",
|
||||
"# GitHub Authentication (Private Repo)\n",
|
||||
"# ===========================================\n",
|
||||
"from getpass import getpass\n",
|
||||
"import os\n",
|
||||
"\n",
|
||||
"print(\"🔐 GitHub Token Required\")\n",
|
||||
"print(\"Get token: https://github.com/settings/tokens\")\n",
|
||||
"print(\"Scope needed: 'repo'\")\n",
|
||||
"print(\"-\" * 50)\n",
|
||||
"\n",
|
||||
"github_token = getpass(\"Enter GitHub Token: \")\n",
|
||||
"os.environ['GITHUB_TOKEN'] = github_token\n",
|
||||
"print(\"✅ Token stored\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue