Dodatne debug informacije za SSH v CI/CD
Build and Deploy / build-and-deploy (push) Successful in 54s
Build and Deploy / build-and-deploy (push) Successful in 54s
This commit is contained in:
1 parent
ac2a9a083e
commit
b3548287b4
1 file changed
+5
-1
@@ -39,17 +39,21 @@ jobs:
|
||||
|
||||
# Setup SSH for deployment with more verbose output
|
||||
mkdir -p ~/.ssh
|
||||
echo "Saving SSH key..."
|
||||
echo "$DEPLOY_SSH_KEY" > ~/.ssh/deployer_key
|
||||
chmod 600 ~/.ssh/deployer_key
|
||||
echo "SSH key saved with proper permissions"
|
||||
|
||||
# Debug - show ssh key format (redacting content)
|
||||
head -n 1 ~/.ssh/deployer_key
|
||||
|
||||
# Add server to known hosts
|
||||
ssh-keyscan -t rsa 130.61.236.31 >> ~/.ssh/known_hosts
|
||||
echo "Server added to known hosts"
|
||||
|
||||
# Test connection first
|
||||
echo "Testing SSH connection..."
|
||||
ssh -i ~/.ssh/deployer_key -o StrictHostKeyChecking=no -v deployer@130.61.236.31 'echo "SSH connection successful"'
|
||||
ssh -v -i ~/.ssh/deployer_key -o StrictHostKeyChecking=no deployer@130.61.236.31 'echo "SSH connection successful"'
|
||||
|
||||
# Deploy to server if connection successful
|
||||
echo "Deploying files to server..."
|
||||
|
||||
Reference in new issue
Block a user