hamonikr 6.0 터미널 gh-pages배포시 password가 틀렸다고 하는 경우

LeeWonjin·2023년 6월 5일
0

문제해결

목록 보기
19/23

문제

$ npm run deploy 

> (패키지 이름)@0.0.1 predeploy
> vite build

vite v4.3.3 building for production...
✓ 87 modules transformed.
dist/index.html                                       0.43 kB │ gzip:  0.29 kB
.... (빌드과정 중략) ...
dist/assets/index-45ca6adc.js                       108.61 kB │ gzip: 46.16 kB
✓ built in 2.71s

> minsuk-kim@0.0.1 deploy
> gh-pages -d dist

Username for 'https://github.com': (깃허브아이디)
Password for 'https://wonjinYi@github.com': 
Username for 'https://github.com': (깃허브아이디)
Password for 'https://wonjinYi@github.com': 

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: https://github.com/(깃허브아이디)/(레포 이름).git/에 대한 인증이 실패하였습니다

node.js환경에서 프론트엔드를 개발할 때 GITHUB-PAGES 배포를 위해 사용하는 gh-pages를 사용한다.

{
  "name": "minsuk-kim",
  "version": "0.0.1",
  "homepage": "https://test4.wonj.in/",
  "scripts": {
  	...
    "predeploy": "vite build",
    "deploy": "gh-pages -d dist",
  },
  "dependencies": {
    "gh-pages": "^5.0.0",
    ...
  },
  "devDependencies": {
  	...
  }
}

gh-pages -d dist로 배포하려면 깃허브 아이디와 비밀번호(토큰)을 물어본다.

토큰이 길어서 Ctrl+Shift+V붙여넣기 했다. 비밀번호를 분명 잘 입력했는데 틀렸다고 한다. 두 세번 물어보다가 틀렸다고 거부한다.

해결

password(토큰)를 입력할 때 백스페이스를 한 번 누른 다음 비밀번호(토큰)를 붙여넣는다.

profile
노는게 제일 좋습니다.

0개의 댓글