Post

fatal could not read Username for 'https://github.com' terminal prompts disabled

๐ŸŽฌ Intro

GitHub Actions์—์„œ ๋ฐœ์ƒํ•œ ์ธ์ฆ ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.


โœ… ๋ฌธ์ œ

1
2
3
4
5
6
    steps:
      - name: ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ฒดํฌ์•„์›ƒ
        uses: actions/checkout@v4
        with:
          token: $
          submodules: true

ํ˜„์žฌ CI workflow์—๋Š” ์„ค์ •ํŒŒ์ผ์„ ์„œ๋ธŒ๋ชจ๋“ˆ์—์„œ ๊ฐ€์ ธ์˜ค๋„๋ก ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ CI๋ฅผ ์œ„ํ•ด์„œ๋Š” ๋ฐ˜๋“œ์‹œ ์œ ํšจํ•œ github ํ† ํฐ์ด ์š”๊ตฌ๋ฉ๋‹ˆ๋‹ค.

img.png

์ด ์—๋Ÿฌ๋Š” GitHub Actions์—์„œ ๋ฐœ์ƒํ•œ ์ธ์ฆ ๋ฌธ์ œ์™€ ๊ด€๋ จ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ตฌ์ฒด์ ์œผ๋กœ โ€œfatal: could not read Username for โ€˜https://github.comโ€™: terminal prompts disabledโ€๋ผ๋Š” ๋ฉ”์‹œ์ง€๋Š” Git์ด GitHub์— ์ ‘๊ทผํ•  ๋•Œ ์‚ฌ์šฉ์ž ์ด๋ฆ„๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์•ผ ํ•˜์ง€๋งŒ, GitHub Actions๋Š” ํ„ฐ๋ฏธ๋„ ์ž…๋ ฅ์„ ๋ฐ›์„ ์ˆ˜ ์—†์–ด์„œ ๋ฐœ์ƒํ•˜๋Š” ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค.

โœ… ํ•ด๊ฒฐ๊ณผ์ •

img_2.png

img_1.png

  • workflow์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํ† ํฐ์ด ๋งŒ๋ฃŒ๋˜์–ด์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ณ  ๋งŒ๋ฃŒ๊ฐ€ ๋˜์—ˆ๋‹ค๋ฉด ์ƒˆ๋กœ ์ƒ์‹ ์„ ํ•ด์ค๋‹ˆ๋‹ค. ์ €์˜ ๊ฒฝ์šฐ submodule ํ† ํฐ์ด ๋งŒ๋ฃŒ๊ฐ€ ๋˜์—ˆ์–ด์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ƒˆ๋กœ ๊ฐฑ์‹ ์„ ํ•ด์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.
  • github actions ๋™์ž‘ ์‹œ ์‚ฌ์šฉํ•˜๋Š” ์„œ๋ธŒ๋ชจ๋“ˆ ํ† ํฐ secret ๊ฐ’์„ ๊ฐฑ์‹ ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

โœจSummary

github actions ๋™์ž‘ ์ค‘ ์ธ์ฆ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด secret ๊ฐ’๋“ค์ด ์ž˜๋ชป๋˜์–ด ์žˆ์ง€๋Š” ์•Š์€์ง€ ์ ๊ฒ€ํ•ด๋ณด๋ฉด ๋ฉ๋‹ˆ๋‹ค.

This post is licensed under CC BY 4.0 by the author.