Skip to content

Commit bf51d05

Browse files
authored
Merge pull request #187 from vue-pivottable/develop
chore: debug private key format
2 parents b9464ec + 0a2fe53 commit bf51d05

File tree

1 file changed

+13
-30
lines changed

1 file changed

+13
-30
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,22 @@ jobs:
1717
pull-requests: write
1818
id-token: write
1919
steps:
20-
- name: Checkout for debugging
21-
uses: actions/checkout@v4
22-
23-
- name: Debug GitHub App Setup
20+
- name: Debug Secrets
2421
run: |
2522
echo "Testing GitHub App configuration..."
26-
echo "APP_ID: $APP_ID"
27-
echo "Installation URL: https://github.com/organizations/vue-pivottable/settings/installations/66276079"
28-
29-
# Create a simple script to test JWT generation
30-
cat > test-jwt.js << 'EOF'
31-
const crypto = require('crypto');
32-
33-
const privateKey = process.env.PRIVATE_KEY;
34-
const appId = process.env.APP_ID;
35-
36-
console.log('App ID:', appId);
37-
console.log('Private Key length:', privateKey.length);
38-
console.log('Private Key starts with:', privateKey.substring(0, 30));
39-
console.log('Private Key ends with:', privateKey.substring(privateKey.length - 30));
40-
41-
// Simple test to see if it's a valid RSA key
42-
try {
43-
const sign = crypto.createSign('RSA-SHA256');
44-
sign.update('test');
45-
sign.sign(privateKey, 'base64');
46-
console.log('✓ Private key is valid for signing');
47-
} catch (error) {
48-
console.error('✗ Private key validation failed:', error.message);
49-
}
50-
EOF
23+
echo "APP_ID length: ${#APP_ID}"
24+
echo "PRIVATE_KEY length: ${#PRIVATE_KEY}"
25+
echo "PRIVATE_KEY first 50 chars: ${PRIVATE_KEY:0:50}"
26+
echo "PRIVATE_KEY last 50 chars: ${PRIVATE_KEY: -50}"
5127
52-
node test-jwt.js
28+
# Check if it's a valid PEM format
29+
if [[ "$PRIVATE_KEY" == *"BEGIN RSA PRIVATE KEY"* ]]; then
30+
echo "✓ Contains BEGIN RSA PRIVATE KEY"
31+
elif [[ "$PRIVATE_KEY" == *"BEGIN PRIVATE KEY"* ]]; then
32+
echo "✓ Contains BEGIN PRIVATE KEY (PKCS#8 format)"
33+
else
34+
echo "✗ Missing proper PEM header"
35+
fi
5336
env:
5437
APP_ID: ${{ secrets.APP_ID }}
5538
PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}

0 commit comments

Comments
 (0)