mirror of
https://github.com/hanzoai/runtime.git
synced 2026-10-30 18:23:13 +00:00
- Renamed all class names: Daytona → HanzoRuntime - Updated error classes: DaytonaError → HanzoRuntimeError - Changed config classes: DaytonaConfig → HanzoRuntimeConfig - Updated environment variables: DAYTONA_* → HANZO_RUNTIME_* - Fixed all import statements and file references - Updated copyright headers to Hanzo Industries Inc - Changed default API URL to https://app.hanzo.ai/api - Renamed source files to match new class names - Incremented version to 0.0.1-dev for republishing
1.4 KiB
1.4 KiB
NPM Authentication for Publishing
Method 1: Using .npmrc with Auth Token
-
First, create an access token on npm:
- Go to https://www.npmjs.com/settings/YOUR_USERNAME/tokens
- Click "Generate New Token"
- Select "Automation" type (bypasses 2FA for CI/CD)
- Copy the token
-
Add the token to your
.npmrcfile:
# In your home directory ~/.npmrc
//registry.npmjs.org/:_authToken=npm_YOUR_TOKEN_HERE
Or for project-specific:
# In project root .npmrc
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
- If using environment variable, set it:
export NPM_TOKEN="npm_YOUR_TOKEN_HERE"
Method 2: Using npm login with --auth-type=legacy
For automation tokens that bypass 2FA:
npm set //registry.npmjs.org/:_authToken "npm_YOUR_TOKEN_HERE"
Method 3: For GitHub Actions / CI
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Publishing with Token
Once configured, you can publish without OTP:
npm publish --access public --tag beta
Security Notes
- Never commit tokens to git
- Use environment variables for CI/CD
- Automation tokens bypass 2FA, so keep them secure
- Tokens can be revoked at https://www.npmjs.com/settings/YOUR_USERNAME/tokens