tschaub / gh-pages

General purpose task for publishing files to a gh-pages branch on GitHub
https://www.npmjs.com/package/gh-pages
MIT License
3.24k stars 190 forks source link

could not read Username for 'https://github.com': No such device or address #384

Open Gltched opened 3 years ago

Gltched commented 3 years ago

How could I fix this?

I am setting up gh-pages as a deploy on github actions, but it gave me this error.

This is my code:

  - uses: actions/checkout@v2
  - name: Use Node.js ${{ matrix.node-version }}
    uses: actions/setup-node@v2
    with:
      node-version: ${{ matrix.node-version }}
  - run: npm i -g yarn
  - run: ip r
  - run: sudo ufw allow 3000
  - run: |
      git config --global user.email "I don't want people to see this ;)" # I have the email in here, I just cut it out so that I don't get spammed.
      git config --global user.name "Gltched"
      cd live-server
      npm install
      yarn add gh-pages
      yarn run deploy
despokd commented 3 years ago

359

willwill96 commented 2 years ago

For my pipeline, I needed to also run this to use the built in token:

git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
huy-lv commented 1 year ago

@willwill96 I followed you and got this error:

$ gh-pages -d build
remote: Permission to huy-lv/repo-name.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/huy-lv/repo-name/': The requested URL returned error: 403