-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathpush_token.bat
More file actions
69 lines (57 loc) · 1.94 KB
/
Copy pathpush_token.bat
File metadata and controls
69 lines (57 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
REM Push using Personal Access Token
REM Instructions: Create a PAT at https://github.com/settings/tokens with 'repo' scope
setlocal enabledelayedexpansion
cd /d "c:\Users\Admin\Desktop\StellarSplit\split-contracts"
echo.
echo ========================================================
echo PUSH WITH PERSONAL ACCESS TOKEN
echo ========================================================
echo.
REM Delete old credentials
echo Clearing old credentials...
cmdkey /delete:git:https://github.com >nul 2>&1
cmdkey /delete:https://github.com >nul 2>&1
echo Current branch:
git branch --show-current
echo.
echo To use this script:
echo 1. Create a PAT at https://github.com/settings/tokens
echo 2. Set environment variable: set GIT_CREDENTIALS_USERNAME=johnsaviour56-ship-it
echo 3. Set environment variable: set GIT_CREDENTIALS_PASSWORD=your_pat_token_here
echo 4. Run this script
echo.
REM Check if credentials are set
if not defined GIT_CREDENTIALS_USERNAME (
echo ERROR: GIT_CREDENTIALS_USERNAME not set
echo Please set it before running this script
pause
exit /b 1
)
if not defined GIT_CREDENTIALS_PASSWORD (
echo ERROR: GIT_CREDENTIALS_PASSWORD not set
echo Please set it before running this script
pause
exit /b 1
)
echo Using credentials for: !GIT_CREDENTIALS_USERNAME!
echo.
echo Attempting push...
echo.
REM Push with credentials from environment variables
git push -u origin add-fallback-action-for-auto-resolve
if %ERRORLEVEL% EQU 0 (
echo.
echo ========================================================
echo SUCCESS! Branch pushed to GitHub!
echo ========================================================
echo.
echo View at: https://github.com/johnsaviour56-ship-it/split-contracts/tree/add-fallback-action-for-auto-resolve
) else (
echo.
echo ========================================================
echo PUSH FAILED
echo ========================================================
)
echo.
pause