ssh-deploy
ssh-deploy copied to clipboard
Delete Git logs and permission error after deploy
I even succeeded in deploying on the production server. However, an unknown phenomenon occurs after deployment to the server.
-
When inquiring with the
git logcommand, all previous logs disappeared except for the last commit log. -
The error below continues to occur during the login process when I pull or fetch.
Username for 'https://github.com': jay-flow
Password for 'https://[email protected]':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/repo/'
I checked my user name and password on my account several times and it works well elsewhere. I'm sure I typed it correctly.
Is there anyone who knows how to solve this problem? Please let me know. (I think it caused the problem by deploying the .git folder together. But I don't know how to solve this)
Below is my Action It is deployed normally.
# This is a basic workflow to help you get started with Actions
name: Deploy to AWS EC2
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Deploy to back end
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.TARGET }}