security: move GitHub token to secure location
Some checks failed
Documentation Validation / validate-docs (push) Has been cancelled
Some checks failed
Documentation Validation / validate-docs (push) Has been cancelled
- Moved GitHub token from workflow file to /root/github_token - Updated workflow to read token from secure file - Set proper permissions (600) on token file - Removed hardcoded token from documentation
This commit is contained in:
@@ -256,8 +256,9 @@ git branch -d feature/new-feature
|
|||||||
# Add GitHub remote
|
# Add GitHub remote
|
||||||
git remote add github https://github.com/oib/AITBC.git
|
git remote add github https://github.com/oib/AITBC.git
|
||||||
|
|
||||||
# Set up GitHub with token
|
# Set up GitHub with token from secure file
|
||||||
git remote set-url github https://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@github.com/oib/AITBC.git
|
GITHUB_TOKEN=$(cat /root/github_token)
|
||||||
|
git remote set-url github https://${GITHUB_TOKEN}@github.com/oib/AITBC.git
|
||||||
|
|
||||||
# Push to GitHub specifically
|
# Push to GitHub specifically
|
||||||
git push github main
|
git push github main
|
||||||
@@ -320,7 +321,8 @@ git remote get-url origin
|
|||||||
git config --get remote.origin.url
|
git config --get remote.origin.url
|
||||||
|
|
||||||
# Fix authentication issues
|
# Fix authentication issues
|
||||||
git remote set-url origin https://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@github.com/oib/AITBC.git
|
GITHUB_TOKEN=$(cat /root/github_token)
|
||||||
|
git remote set-url origin https://${GITHUB_TOKEN}@github.com/oib/AITBC.git
|
||||||
|
|
||||||
# Force push if needed
|
# Force push if needed
|
||||||
git push --force-with-lease origin main
|
git push --force-with-lease origin main
|
||||||
|
|||||||
Reference in New Issue
Block a user