github에서 웹서버로 action 설정

github에서 웹서버로 action 설정

QA

github에서 웹서버로 action 설정

본문

pc에서 제작한 코드를 github로 push 한후에 

push 된 소스코드를 master로 병합하면 

개발서버로 병합한 소스코드가 적용되게 하는 스크립트입니다. 

 

# This is a basic workflow to help you get started with Actions

name: CH GROUP 개발서버 CI

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the dev branch
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# 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
      - name : GROUP 개발서버 CI
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.HOST }} 
          username: ${{ secrets.USERNAME }} 
          key: ${{ secrets.KEY }}
          port : ${{ secrets.PORT }}
          script: |
            cd /home/lsc/dev/git_test
            git pull https://${{ secrets.TOKEN }}@github주소

 

이렇게 작성을 해서 실행하면

ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

오류가 납니다. 

 

어떻게 해결해야 할까요?

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 33
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT