์๋ ,
๋ก๊ทธ์ธ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
3.13.0
$ firebase login --no-localhost --debug
์ฑ๊ณต์ ์ธ ๋ก๊ทธ์ธ
$ firebase login --no-localhost --debug
[2017-10-03T18:14:05.541Z] ----------------------------------------------------------------------
[2017-10-03T18:14:05.546Z] Command: /usr/local/bin/node /usr/local/bin/firebase login --no-localhost --debug
[2017-10-03T18:14:05.546Z] CLI Version: 3.13.0
[2017-10-03T18:14:05.546Z] Platform: linux
[2017-10-03T18:14:05.546Z] Node Version: v8.6.0
[2017-10-03T18:14:05.547Z] Time: Tue Oct 03 2017 15:14:05 GMT-0300 (BRT)
[2017-10-03T18:14:05.547Z] ----------------------------------------------------------------------
? Allow Firebase to collect anonymous CLI usage and error reporting information? No
Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=866083077&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
? Paste authorization code here: 4/9FxonAqbx4paDM4BWzPaSLFuLbAUaTB8bS65YK5R_vc
[2017-10-03T18:14:20.567Z] >>> HTTP REQUEST POST https://accounts.google.com/o/oauth2/token { code: '4/9FxonAqbx4paDM4BWzPaSLFuLbAUaTB8bS65YK5R_vc',
client_id: '563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
client_secret: 'j9iVZfS8kkCEFUPaAeJV0sAi',
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
grant_type: 'authorization_code' }
Tue Oct 03 2017 15:14:20 GMT-0300 (BRT)
[2017-10-03T18:14:20.582Z] Token Fetch Error: Error
at FirebaseError (/usr/local/lib/node_modules/firebase-tools/lib/error.js:11:17)
at Request._callback (/usr/local/lib/node_modules/firebase-tools/lib/api.js:32:23)
at self.callback (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:186:22)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at Request.onRequestError (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:878:8)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
at ClientRequest.onError (/usr/local/lib/node_modules/firebase-tools/node_modules/tunnel-agent/index.js:179:21)
at Object.onceWrapper (events.js:316:30)
Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth
For CI servers and headless environments, generate a new token with firebase login:ci
๋ฌด์จ ์ผ์ด ์ผ์ด๋๊ณ ์๋์ง ์๋ ์ฌ๋์ด ์์ต๋๊น?
์๋ , ๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ์๋ค
๋์ผํ ๋ฌธ์ ์ ์ง๋ฉดํ๊ณ ์์ง๋ง 'Firebase ๋ก๊ทธ์ธ' ๋ช
๋ น์ ์ฌ์ฉํฉ๋๋ค!
์ด์ ๋ํ ํด๊ฒฐ์ฑ
์ ์ ์ํด ์ฃผ์ญ์์ค.
๋๋ ๋๊ฐ์ ๋ฌธ์ ๋ฅผ ๊ฒช๊ณ ์์ต๋๋ค. ๋๋ --reauth
, --no-localhost
๋ฐ --debug
์ $ firebase login
๋ฐ firebase login:ci
์ ๋ค๋ฅธ ์กฐํฉ์ ์๋ํ์ง๋ง ์๋ฌด ์์ฉ์ด ์์์ต๋๋ค. ๋ํ ๋ช
์์ firebase logut
์ ์ํํด๋ ์ฐจ์ด๊ฐ ์์ต๋๋ค. ๋ํ Firefox, Chrome ๋ฐ Safari์ ๊ฐ์ ์ธ ๊ฐ์ง ๋ค๋ฅธ ๋ธ๋ผ์ฐ์ ๋ฅผ ์ฌ์ฉํ์ฌ ์ธ์ฆ์ ์ํํ์ฌ ์ฐจ์ด๊ฐ ์๋์ง ํ์ธํ์ต๋๋ค. ๊ทธ๋ ์ง ์์๋ค.
"ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ ์ค๋ฅ" @thiagobonfante ์ ์ข ๋ฅ๋ก ํ๋จํ๋ฉด OAuth API์ ๋ํ API ์์ฒญ์ด ์คํจํ์ฌ ๋ค์ ์์น์์ ์ฝ์ ์ด ๊ฑฐ๋ถ๋์์ต๋๋ค.
OAuth API์ ์๋ต์ด ์๋ฌด๋ฆฌ ๊ฒฐํจ์ด ์์ด๋ ์ํ ์ฝ๋์ ์๋ต ๋ณธ๋ฌธ์ด ๋ชจ๋ ํฌํจ๋ ์ค๋ฅ ๋ฉ์์ง๊ฐ ํ์๋๋ ๋ฐฉ์: https://github.com/firebase/firebase-tools/blob/b247ab9ca9e669d833ff830465c280e304d8b068/lib/auth .js#L75
ํ์ ์กฐ์น๋ฅผ ์ํด Firebase ๋๊ตฌ์ฉ NPM ํจํค์ง๋ฅผ ๋ค์ ์ค์นํ์ฌ ์ฐจ์ด๋ฅผ ๋ง๋ค ์ ์๋์ง ํ์ธํ๋ ค๊ณ ํ ๋ DNS ๋ฌธ์ ๋์๊ฐ ๋๋ ๋ฐฉ์์ผ๋ก NPM์ด ์คํจํ์ต๋๋ค. ์ปดํจํฐ(macOS 10.12.6 Sierra)๋ฅผ ๋ค์ ์์ํ ๋ค์ NPM ์ค์น์ Firebase ๋๊ตฌ ์ธ์ฆ์ด ๋ชจ๋ ์๋ฃ๋์์ต๋๋ค.
๋ฐ๋ผ์ ๋ ๋ฌธ์ ๊ฐ ๊ด๋ จ๋์ด ์๋์ง ํ์คํ๊ฒ ๋งํ ์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ ๊ฒฝ์ฐ ์ปดํจํฐ๋ฅผ ์ฌ๋ถํ ํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
@tblomseth ์ ๊ฒฝ์ฐ์๋ ์ด๋ฏธ ๋ง์ํ์ ๋ชจ๋ ๊ฒ์ ์๋ํ์ต๋๋ค. 83ํ์์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
๊ทธ๋๋ ๋ฌธ์ ๊ฐ ์์ผ๋ฉด ๋ค์ ์ฌ์ญ์์ค.
๊ฐ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค. ์ด์ ๋ ๋๊ฐ์ด ํด๋ดค๋๋ฐ ์ ๋๋ค์. ํ์ง๋ง ์ด์ ์ธ์ฆ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ์ค์ท๋ ์ฒจ๋ถํ์ต๋๋ค.
์ฌ๊ธฐ์ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ์์ต๋๊น?
๊ฐ์ ๋ฌธ์ :(
๊ฐ์ ๋ฌธ์
๊ฐ์ ๋ฌธ์
์ค๋ฅ ๋ฉ์์ง ์ ์๊ณผ ๊ฐ์ด firebase login --reauth
๋ฅผ ์คํํ์ต๋๊น?
๊ฐ์ ๋ฌธ์
์๋ @laurenzlong , ์ด๊ฒ๋ ์๋ํ์ง ์์์ต๋๋ค
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์๊ณ ๋๋๋ก ์ด๊ฒ์ด ๋๋ฅผ ๋์์ต๋๋ค.
set "NODE_TLS_REJECT_UNAUTHORIZED=0"
๊ทธ๋ฐ ๋ค์ Firebase ๋ก๊ทธ์ธ์ ๋ค์ ์คํํ์ญ์์ค.
@MrSuhov ๊ฐ์ฌํฉ๋๋ค, ์ ๋ง ํจ๊ณผ๊ฐ ์์ต๋๋ค!
@MrSuhov ๊ฐ์ฌํฉ๋๋ค, ์ ์๊ฒ๋ ํจ๊ณผ๊ฐ ์์ต๋๋ค!!
๊ฐ์ ๋ฌธ์
๋์ผํ ๋ฌธ์ - ์์ ๋ชจ๋ ๊ฒ์ ์๋ํ์ง๋ง ํ๋ก์๋ฅผ ์ฌ์ฉํ๊ณ ์์ง ์์ต๋๋ค. ์ด ์ญ์ ์์ธ์ผ๋ก ๋ณด์ ๋๋ค.
4.0.1
์ฐฝ
$ Firebase ๋ก๊ทธ์ธ --no-localhost --debug
์ฑ๊ณต์ ์ธ ๋ก๊ทธ์ธ
PS C:_angular\flow-v6.2.4> Firebase ๋ก๊ทธ์ธ --no-localhost --debug
[2018-08-01T16:31:54.980Z] -------------------------------------- --------------------------------
[2018-08-01T16:31:54.996Z] ๋ช
๋ น: C:\Program Files\nodejs\node.exe C:\Users\patrick\AppData\Roamingnpm\node_modules\firebase-tools\binfirebase ๋ก๊ทธ์ธ --no-localhost - -๋๋ฒ๊ทธ
[2018-08-01T16:31:54.996Z] CLI ๋ฒ์ : 4.0.1
[2018-08-01T16:31:54.997Z] ํ๋ซํผ: win32
[2018-08-01T16:31:54.997Z] ๋
ธ๋ ๋ฒ์ : v9.10.1
[2018-08-01T16:31:54.998Z] ์๊ฐ: Wed Aug 01 2018 18:31:54 GMT+0200 (Romance (zomertijd))
[2018-08-01T16:31:54.998Z] -------------------------------------- --------------------------------
? Firebase๊ฐ ์ต๋ช ์ CLI ์ฌ์ฉ ๋ฐ ์ค๋ฅ ๋ณด๊ณ ์ ๋ณด๋ฅผ ์์งํ๋๋ก ํ์ฉํ์๊ฒ ์ต๋๊น? ์๋
๋ก๊ทธ์ธํ๋ ค๋ฉด ๋ชจ๋ ๊ธฐ๊ธฐ์์ ๋ค์ URL์ ๋ฐฉ๋ฌธํ์ธ์.
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2F%20https%3A%2F%2Fwww. 20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=781119839&redirect_uri=urn%3Aietf% 3์์
? ์ฌ๊ธฐ์ ์ธ์ฆ ์ฝ๋๋ฅผ ๋ถ์ฌ๋ฃ์ผ์ธ์. 4/AAAcSvs3St9DxIT5uTp-uj0Eln5YzWpq_zz7IPv0EUxV00lY_n9kSvA
[2018-08-01T16:32:11.524Z] >>> HTTP ์์ฒญ ๊ฒ์๋ฌผ https://accounts.google.com/o/oauth2/token
{ ์ฝ๋: '4/AAAcSvs3St9DxIT5uTp-uj0Eln5YzWpq_zz7IPv0EUxV00lY_n9kSvA',
client_id: '563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
client_secret: 'j9iVZfS8kkCEFUPaAeJV0sAi',
redirect_uri: ' urn:ietf :wg: oauth:2.0 :oob',
Grant_type: '๊ถํ_์ฝ๋' }
2018๋
8์ 1์ผ ์์์ผ 18:32:11 GMT+0200(Romance(zomertijd))
[2018-08-01T16:32:11.626Z] ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ ์ค๋ฅ: ์ค๋ฅ
์๋ก์ด FirebaseError์์ (C:\Users\patrick\AppData\Roamingnpm\node_modules\firebase-tools\liberror.js:11:16)
Request._callback์์ (C:\Users\patrick\AppData\Roamingnpm\node_modules\firebase-tools\lib\api.js:35:11)
self.callback์์ (C:\Users\patrick\AppData\Roamingnpm\node_modules\firebase-tools\node_modules\request\request.js:185:22)
Request.emit์์ (events.js:180:13)
Request.emit์์ (domain.js:421:20)
Request.onRequestError์์ (C:\Users\patrick\AppData\Roamingnpm\node_modules\firebase-tools\node_modules\request\request.js:877:8)
ClientRequest.emit์์ (events.js:180:13)
ClientRequest.emit์์ (domain.js:421:20)
TLSSocket.socketErrorListener์์ (_http_client.js:395:9)
TLSSocket.emit์์(events.js:180:13)
์ค๋ฅ: ์ธ์ฆ ์ค๋ฅ: ์๊ฒฉ ์ฆ๋ช ์ด ๋ ์ด์ ์ ํจํ์ง ์์ต๋๋ค. Firebase ๋ก๊ทธ์ธ --reauth๋ฅผ ์คํํ์ญ์์ค.
CI ์๋ฒ ๋ฐ ํค๋๋ฆฌ์ค ํ๊ฒฝ์ ๊ฒฝ์ฐ firebase login:ci ๋ฅผ ์ฌ์ฉํ์ฌ ์ ํ ํฐ์ ์์ฑํฉ๋๋ค.
์ด ๋ฌธ์ ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ค์ ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์๋ํ์ต๋๋ค.
๋๊ตฐ๊ฐ ๋์์ค ์ ์์ต๋๊น?
๋ด ์ ํ๋ฆฌ์ผ์ด์
์ ์ ๋ฒ์ ์ ์ต๋ํ ๋นจ๋ฆฌ ๋ฐฐํฌํด์ผ ํฉ๋๋ค.
๊ฐ์ฌ ํด์.
๋๋์ด ๋๊ฐ์ ๋ฌธ์ ์ ์ง๋ฉดํ์ต๋๋ค. ๋ด ์ปดํจํฐ๋ฅผ ๋ค์ ์์ํ์ต๋๋ค. Docker๋ฅผ ๋ค์ ์์ํ๋ ๊ฒ์ผ๋ก ์ถฉ๋ถํ์ง๋ง ์ด๋ด!-- ๊ทธ๋ฆฌ๊ณ docker system prune
๋ฅผ ์คํํ์ต๋๋ค.
Docker๊ฐ ์์ ํ ์๋ก์์ง๋ฉด ๋น๋๋ฅผ ๋ค์ ์คํํ๊ณ ์ ๋๋ก ์๋ํ์ต๋๋ค.
๋ํ ๋น๋ ์คํฌ๋ฆฝํธ์ set "NODE_TLS_REJECT_UNAUTHORIZED=0"
๋ฅผ ์ถ๊ฐํ์ต๋๋ค... ๊ทธ๋ ๊ฒ ํด๋ ๋์์ด ๋ ๊น์?
์ค๊ตญ์ ์๋ค๋ฉด ์ฝ์์์ shadowsocks์ ๊ฐ์ ํ๋ก์๋ฅผ ์ค์ ํ์ญ์์ค.
~/.zshrc
function proxy() {
export http_proxy="http://192.168.1.100:1087"
export https_proxy="http://192.168.1.100:1087"
export all_proxy="http://192.168.1.100:1087"
}
function unproxy() {
unset http_proxy https_proxy all_proxy
}
๋๋ ๋ํ ๊ฐ์ ๋ฌธ์ ์ ์ง๋ฉดํ๊ณ ์์ต๋๋ค. ์ฌ๊ธฐ ๋ด ๋ก๊ทธ๊ฐ ์์ต๋๋ค ..
localhost:๊ธฐ๋ฅ gradler$ Firebase ๋ก๊ทธ์ธ --no-localhost --debug
[2019-03-18T07:46:03.766Z] -------------------------------------- --------------------------------
[2019-03-18T07:46:03.769Z] ๋ช
๋ น: /usr/local/bin/node /usr/local/bin/firebase ๋ก๊ทธ์ธ --no-localhost --debug
[2019-03-18T07:46:03.770Z] CLI ๋ฒ์ : 6.5.0
[2019-03-18T07:46:03.770Z] ํ๋ซํผ: ๋ค์
[2019-03-18T07:46:03.770Z] ๋
ธ๋ ๋ฒ์ : v11.2.0
[2019-03-18T07:46:03.770Z] ์๊ฐ: 2019๋
3์ 18์ผ ์์์ผ 16:46:03 GMT+0900(ํ๊ตญ ํ์ค์)
[2019-03-18T07:46:03.770Z] -------------------------------------- --------------------------------
? Firebase๊ฐ ์ต๋ช ์ CLI ์ฌ์ฉ ๋ฐ ์ค๋ฅ ๋ณด๊ณ ์ ๋ณด๋ฅผ ์์งํ๋๋ก ํ์ฉํ์๊ฒ ์ต๋๊น? ๋ค
๋ก๊ทธ์ธํ๋ ค๋ฉด ๋ชจ๋ ๊ธฐ๊ธฐ์์ ๋ค์ URL์ ๋ฐฉ๋ฌธํ์ธ์.
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03xxxxxxx.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleFapisplatform 20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=111287150&redirect_uri=urn%3Aietf% 3์์
? ์ฌ๊ธฐ์ ์ธ์ฆ ์ฝ๋๋ฅผ ๋ถ์ฌ๋ฃ์ผ์ธ์: 4/EAHhdfZTTEq50Xbdh6Cv4no5ZjeO-xxxx
[2019-03-18T07:46:17.983Z] >>> HTTP ์์ฒญ ๊ฒ์๋ฌผ https://accounts.google.com/o/oauth2/token
์ฝ๋=4/EAHhdfZTTEq50Xbdh6Cv4no5ZjeO-xxxx, client_id= 563584335869-fgrhgmd47bqnekij5xxxxxxxx.apps.googleusercontent.com , client_secret= j9iVZfS8kkCEFUPUPxxxx
[2019-03-18T07:46:18.022Z] ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ ์ค๋ฅ: ์ค๋ฅ
์๋ก์ด FirebaseError์์ (/usr/local/lib/node_modules/firebase-tools/lib/error.js:9:18)
Request._callback์์ (/usr/local/lib/node_modules/firebase-tools/lib/api.js:30:31)
self.callback์์ (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
Request.emit์์ (events.js:182:13)
Request.EventEmitter.emit์์ (domain.js:441:20)
Request.onRequestError์์ (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:881:8)
ClientRequest.emit์์ (events.js:182:13)
ClientRequest.EventEmitter.emit์์ (domain.js:441:20)
TLSSocket.socketErrorListener์์ (_http_client.js:399:9)
TLSSocket.emit์์(events.js:182:13)
์ค๋ฅ: ์ธ์ฆ ์ค๋ฅ: ์๊ฒฉ ์ฆ๋ช ์ด ๋ ์ด์ ์ ํจํ์ง ์์ต๋๋ค. Firebase ๋ก๊ทธ์ธ --reauth๋ฅผ ์คํํ์ญ์์ค.
CI ์๋ฒ ๋ฐ ํค๋๋ฆฌ์ค ํ๊ฒฝ์ ๊ฒฝ์ฐ firebase login:ci ๋ฅผ ์ฌ์ฉํ์ฌ ์ ํ ํฐ์ ์์ฑํฉ๋๋ค.
๊ทธ๊ฒ์ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
firebase logout
๋ก๊ทธ์์ํ๋ค๊ฐ firebase login
๋ก ๋ค์ ๋ก๊ทธ์ธํฉ๋๋ค.
@tennessine ์ผ ์ผ, ์ด๊ฑฐ ์ด๋ค ํ์ผ์ ์ธํธ์ผ? ๋ฆฌ๋ ์ค ์๋ฒ์ ์๋์?
๋์ผํ ๋ฌธ์ ๋ฐ์ ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ ์ค๋ฅ: ์ค๋ฅ; ๋๊ตฐ๊ฐ ๊ทธ๊ฒ์ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ์ ๋ํ ๋ช ๊ฐ์ง ํ์ด ์์ต๋๊น?
๋๋ ๋ด ํธ์์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์๋ค. ์ด๊ฒ์ ์ค์ ๋ก ํด๋น ๋ฌธ์ ์ ์ฐ๊ฒฐ๋์์ต๋๋ค. https://github.com/firebase/firebase-admin-node/issues/115
๋ชป์๊ธด ์ฝ๋๋ฅผ ์ถ๊ฐํ๋ ๋ฌธ์ ๋ฅผ ์์ ํ์ต๋๋ค. process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; ์์ฒญ ํธ์ถ ์ ์ api.js์์
@tennessine๋ ๊ฐ์ฌํฉ๋๋ค. ๋น์ ์ ๋ฐฉ์์ ์ ์๊ฒ ํจ๊ณผ์ ์
๋๋ค.
์๋
ํ์ธ์ @cnscorpions , ์ ๋ ๋ค์์ ์ฌ์ฉํ๊ณ ์์ต๋๋ค:
์10
Cmder(bash) # ๊ทธ๋ฌ๋ฉด Windows์์ Linux ๋ช ๋ น์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
Shadowsocks-์ฐฝ๋ฌธ
cmder๋ฅผ ์ถ์ถํ ๊ฒฝ๋ก์์ user_profile.sh
ํ์ผ์ ์ฐพ์ผ์ญ์์ค. C:\Users\Cmder\config
์ ๊ฐ์ ์ ์์ต๋๋ค.
๊ทธ๋ฐ ๋ค์ ์๋ ๊ธฐ๋ฅ์ ์ถ๊ฐํ์ญ์์ค (๋ค์ @tennessine ์๊ฒ ๊ฐ์ฌ๋๋ฆฝ๋๋ค)
function pxyo() {
export http_proxy="http://127.0.0.1:1080"
export https_proxy="http://127.0.0.1:1080"
export all_proxy="http://127.0.0.1:1080"
echo 'proxy-on'
}
function pxyf() {
unset http_proxy https_proxy all_proxy
echo 'proxy-off'
}
์ฐธ๊ณ :
ํฌํธ 1080(๊ธฐ๋ณธ ๋ก์ปฌ ํฌํธ)์ ์ฌ์ฉํ๋ฏ๋ก ์์ ๊ฐ์ด ์ค์ ํฉ๋๋ค.
๊ทธ๋ฆฌ๊ณ shadowsock์ ๊ฒฝ์ฐ 127.0.0.1
๊ทธ๋ฐ ๋ค์ pxyo
๋ฅผ ์ฌ์ฉํ์ฌ ์ธํธ๋ฅผ ์ด๋ฉด ์ง๊ธ Firebase์ ๋ก๊ทธ์ธํ ์ ์์ต๋๋ค.
๋ค์ ๋ก๊ทธ์ธ์ ์คํจํ๋ฉด curl www.google.com
์ฐ๊ฒฐ์ ํ์ธํ์ญ์์ค.
๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์๋ํฉ๋๋ค.
๋๋ firebase login --debug
๋ฅผ ์คํํ๊ณ ์ถ๋ ฅ์ ๋์๊ฒ ๋ค์์ ๋ณด์ฌ์ฃผ์๋ค:
[2019-08-27T22:59:17.587Z] ----------------------------------------------------------------------
[2019-08-27T22:59:17.590Z] Command: /usr/local/bin/node
[2019-08-27T22:59:17.590Z] CLI Version: 7.2.2
[2019-08-27T22:59:17.590Z] Platform: darwin
[2019-08-27T22:59:17.590Z] Node Version: v10.15.3
[2019-08-27T22:59:17.591Z] Time: Tue Aug 27 2019 15:59:17 GMT-0700 (Pacific Daylight Time)
**[2019-08-27T22:59:17.591Z] Env Overrides: FIREBASE_CLIENT_SECRET**
[2019-08-27T22:59:17.591Z] ----------------------------------------------------------------------
Firebase๋ ์ด์ ์์กดํ๋ค๋ ์ฌ์ค์ ๋ชจ๋ฅธ ์ฑ FIREBASE_CLIENT_SECRET ๋ณ์๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ด๊ฒ์ ์๊ฐ์ ๋ญ๋นํ์ต๋๋ค... ๋๋ฒ๊ทธ๋ฅผ ํ์ธํ์ฌ ์์ ๋ ๋ชจ๋ฅด๊ฒ env ๋ณ์๋ฅผ ๋ฎ์ด์ฐ๊ณ ์๋์ง ํ์ธํ์ญ์์ค. ๋ณ์ ์ค์ ์ ํด์ ํ ํ ๋ฐ๋ก ๋ก๊ทธ์ธํ ์ ์์์ต๋๋ค.
๋ฐฉ๊ธ ์ด๊ฒ์ ๋ถ๋ช์ณค์ต๋๋ค. ์์์ ๋ณผ ์ ์๋ฏ์ด POST ์์ฒญ์์ ์คํจํ ๊ฒ์ฒ๋ผ ๋ณด์ด๊ณ ๋ค์๊ณผ ๊ฐ์ด ๋์์ค๋ ๋ฐ ์๊ฐ์ด ์ค๋ ๊ฑธ๋ฆฝ๋๋ค.
[2019-09-03T04:50:55.231Z] ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ ์ค๋ฅ: ์ค๋ฅ
์๋ก์ด FirebaseError์์ (/usr/local/lib/node_modules/firebase-tools/lib/error.js:9:18)
Request._callback์์ (/usr/local/lib/node_modules/firebase-tools/lib/api.js:30:31)
self.callback์์ (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
Request.emit์์ (events.js:182:13)
Request.EventEmitter.emit์์ (domain.js:441:20)
Request.onRequestError์์ (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:881:8)
ClientRequest.emit์์ (events.js:182:13)
ClientRequest.EventEmitter.emit์์ (domain.js:441:20)
TLSSocket.socketErrorListener์์ (_http_client.js:399:9)
TLSSocket.emit์์(events.js:182:13)
ํธ์ง: ์์ ์ ์ ์ค ์ด๋ ๊ฒ๋ ์๋ํ์ง ์์์ต๋๋ค(NODE_TLS_REJECT_UNAUTHORIZED ์ค์ ํฌํจ). ๊ทธ๋ฌ๋ ํ๋ก์ ์์ ์ ์๋ํ์ง ์์์ต๋๋ค.
ํธ์ง 2: ์ ์๊ฒ๋ ๋คํธ์ํฌ ์ค๋ฅ์ธ ๊ฒ ๊ฐ์์ต๋๋ค. 30๋ถ ํ์ ๊ฐ์ ๊ฒ์ ๋ค์ ์๋ํ๋๋ฐ ์๋ํ์ต๋๋ค.
7.3.0์ ์คํํ๊ณ 7.1.1๋ก ๋๋๋ฆฌ๊ธฐ
`` Firebase ๋ก๊ทธ์ธ --reauth --no-localhost```
ํ ํฐ์ ๋ฐ์์ ๋ถ์ฌ๋ฃ๊ณ ์ค๋๋ง์
Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth
--debug ์ฌ์ฉ
[2019-09-05T00:20:59.959Z] >>> HTTP REQUEST POST https://accounts.google.com/o/oauth2/token
code=4/qgGpDeAVtNXUoSZ5CYXn5APgtFKgI4wyc0Mtqbnb8XSQvuEJs0VvAvc, client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com, client_secret=j9iVZfS8kkCEFUPaAeJV0sAi, redirect_uri=urn:ietf:wg:oauth:2.0:oob, grant_type=authorization_code
์ค๋ ์ค๋ ๊ธฐ๋ค๋ ค...
[2019-09-05T00:23:10.060Z] Token Fetch Error: Error
at new FirebaseError (/home/enric/.asdf/installs/nodejs/10.16.0/.npm/lib/node_modules/firebase-tools/lib/error.js:9:18)
at Request._callback (/home/enric/.asdf/installs/nodejs/10.16.0/.npm/lib/node_modules/firebase-tools/lib/api.js:30:31)
at self.callback (/home/enric/.asdf/installs/nodejs/10.16.0/.npm/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.onRequestError (/home/enric/.asdf/installs/nodejs/10.16.0/.npm/lib/node_modules/firebase-tools/node_modules/request/request.js:881:8)
at ClientRequest.emit (events.js:198:13)
at ClientRequest.EventEmitter.emit (domain.js:448:20)
at ClientRequest.onError (/home/enric/.asdf/installs/nodejs/10.16.0/.npm/lib/node_modules/firebase-tools/node_modules/tunnel-agent/index.js:179:21)
at Object.onceWrapper (events.js:286:20)
Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth
For CI servers and headless environments, generate a new token with firebase login:ci
๋งค์ฐ ์ค๋ง์ค๋ฝ์ต๋๋ค. ๋ด ์ฑ์ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค. ๋๋ Firebase๋ฅผ ์ข์ํ์ง๋ง ์ด๋ฐ ์ข ๋ฅ์ ๊ฒ๋ค์ ํ๋ก๋์ ์์ ๊ทธ๊ฒ์ ์ฌ์ฉํ๋ ๊ฒ์ ๋ํด ์ง๋ฌธํ๊ฒ ๋ง๋ญ๋๋ค.
๋ต๋ณ:
๋ค๋ฅธ ์ฌ๋์ด ์ ์ํ๋์ง ํ์ธํ๊ธฐ ์ํด ์ ์ฒด ๋ณ๊ฒฝ ๋ด์ฉ์ ์ฝ์ง ์์์ต๋๋ค.
Firebase๋ ํ์ค GCP Oauth2 ํ ํฐ์ ์กด์คํฉ๋๋ค.
๋ธ๋ผ์ฐ์ ๋ก ์ด๋ํ์ฌ ์ฝ๋๋ฅผ ๊ฐ์ ธ์์ผ ํ๋ ๊ฒ์ ๊ทธ๋ค์ง CI๋ ํค๋๋ฆฌ์ค์ฒ๋ผ ๋ณด์ด์ง ์์ต๋๋ค.
์ด๊ฒ์ ์ฐ๋ฆฌ๋ฅผ ์ํด ์ผํ๊ณ ์์ต๋๋ค:
export GOOGLE_APPLICATION_CREDENTIALS=key.json # ์ฌ๊ธฐ์ key.json์ ์๋น์ค ๊ณ์ json ํ์ผ์
๋๋ค.
๋ด๋ณด๋ด๊ธฐ FIREBASE_TOKEN=$(gcloud auth application-default print-access-token)
๋๊ตฐ๊ฐ๊ฐ ์์ฒด ์๋ช ์ธ์ฆ์๊ฐ ์๋ ํ์ฌ ํ๋ก์ ๋ค์์ firebase-cli๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ:
๋ฐฐ์ฌ์์:
export NODE_TLS_REJECT_UNAUTHORIZED=0
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์๊ณ ๋๋๋ก ์ด๊ฒ์ด ๋๋ฅผ ๋์์ต๋๋ค.
set "NODE_TLS_REJECT_UNAUTHORIZED=0"
๊ทธ๋ฐ ๋ค์ Firebase ๋ก๊ทธ์ธ์ ๋ค์ ์คํํ์ญ์์ค.
์ด๋ค ํ์ผ์์ ์ด๊ฒ์ ์ค์ ํ ์ ์์ต๋๊น?
๋๋ ๋ด ํธ์์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์๋ค. ์ด๊ฒ์ ์ค์ ๋ก ํด๋น ๋ฌธ์ ์ ์ฐ๊ฒฐ๋์์ต๋๋ค: firebase/firebase-admin-node#115
๋ชป์๊ธด ์ฝ๋๋ฅผ ์ถ๊ฐํ๋ ๋ฌธ์ ๋ฅผ ์์ ํ์ต๋๋ค. process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; ์์ฒญ ํธ์ถ ์ ์ api.js์์
์ด๊ฑฐ ์ ํํ ์ด๋์ ์ฐพ์ ์ ์๋์ง ์๋ ค์ฃผ์ค ์ ์๋์?
๋ฐฐ์ฌ์์:
export NODE_TLS_REJECT_UNAUTHORIZED=0
@daryoooooo ๊ทธ๋ฅ bash์์ ํ์ธ์
๋ญ์ง ๋ชฐ๋ผ์ ๋ ์ค๋ช ํด์ฃผ์ค ์ ์๋์? ๋ฐฐ์ฌ๋?
2020๋ 3์ 28์ผ ํ ์์ผ ์ค์ 4์ 42๋ถ์ Moa Lai [email protected] ์ด ์์ฑํ์ต๋๋ค.
๋ฐฐ์ฌ์์:
NODE_TLS_REJECT_UNAUTHORIZED=0 ๋ด๋ณด๋ด๊ธฐ
@daryoooooo https://github.com/daryoooooo ๊ทธ๋ฅ bash์์ ํ์ธ์
โ
๋น์ ์ด ์ธ๊ธ๋์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๋ ๊ฒ์ ๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธํ์ธ์.
https://github.com/firebase/firebase-tools/issues/486#issuecomment-605383768 ,
๋๋ ๊ตฌ๋ ์ทจ์
https://github.com/notifications/unsubscribe-auth/AM6RWMW6POW2CZLJ76K3P5TRJVPYJANCNFSM4D5SJF7A
.
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์๊ณ VPN ์ฐ๊ฒฐ์ ๋๊ณ ์๋ํ์ง๋ง ์๋ํ์ต๋๋ค !!!
๋์์ฃผ์ธ์. ๋๋ฅผ ์ํด ์๋ํ๋ ์๋ฃจ์ ์ด ์์ต๋๋ค :(
ํด๊ฒฐํ ์ ์์ต๋๋ค. ๋ ์ด์ ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ์๋์?
์ค๊ตญ์ ์๋ค๋ฉด ์ฝ์์์ shadowsocks์ ๊ฐ์ ํ๋ก์๋ฅผ ์ค์ ํ์ญ์์ค.
~/.zshrcfunction proxy() { export http_proxy="http://192.168.1.100:1087" export https_proxy="http://192.168.1.100:1087" export all_proxy="http://192.168.1.100:1087" } function unproxy() { unset http_proxy https_proxy all_proxy }
bash(Windows)์์ ๋ค์์ ์คํํฉ๋๋ค.
set http_proxy=http://127.0.0.1:<port> & set https_proxy=http://127.0.0.1:<port>
์๋ํฉ๋๋ค. ๊ฐ์ฌํฉ๋๋ค. ์ผ๋ฐ์ ์ผ๋ก Shadowsock์ด๋ Clash๋ bash์์ ์๋ํ์ง ์์ ์ ์์ต๋๋ค.
@MoaLaiSkirulais ์ ์๋ฃจ์ ์ด ์ ์๊ฒ ํจ๊ณผ์ ์ ๋๋ค....
D:\Aarya's Files\Doctor Management APP\adminlte-v3\WEBSITE FOLDER\medical>firebase ๋ก๊ทธ์ธ
i Firebase๋ ์ ํ ๊ฐ์ ์ ๋์์ด ๋๋๋ก CLI ์ฌ์ฉ ๋ฐ ์ค๋ฅ ๋ณด๊ณ ์ ๋ณด๋ฅผ ์ ํ์ ์ผ๋ก ์์งํฉ๋๋ค. ๋ฐ์ดํฐ๋ Google์ ๊ฐ์ธ์ ๋ณด ๋ณดํธ์ ์ฑ
(https://policies.google.com/privacy)์ ๋ฐ๋ผ ์์ง๋๋ฉฐ ๊ทํ๋ฅผ ์๋ณํ๋ ๋ฐ ์ฌ์ฉ๋์ง ์์ต๋๋ค.
? Firebase์์ CLI ์ฌ์ฉ ๋ฐ ์ค๋ฅ ๋ณด๊ณ ์ ๋ณด๋ฅผ ์์งํ๋๋ก ํ์ฉํ์๊ฒ ์ต๋๊น? ๋ค
i ์ธ์ ๋ ์ง ๋ฐ์ดํฐ ์์ง ๊ธฐ๋ณธ ์ค์ ์ ๋ณ๊ฒฝํ๋ ค๋ฉด firebase logout
๋ฅผ ์คํํ๊ณ ๋ค์ ๋ก๊ทธ์ธํ์ญ์์ค.
๋ก๊ทธ์ธํ๋ ค๋ฉด ์ด ๊ธฐ๊ธฐ์์ ๋ค์ URL์ ๋ฐฉ๋ฌธํ์ธ์.
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2F%2Fwww. 20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=22105336&redirect_uri=http%3A%2F%90
์ธ์ฆ ๋๊ธฐ ์ค...
์ค๋ฅ: ์๊ธฐ์น ์์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
๋์์ฃผ์ธ์.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์๊ณ ๋๋๋ก ์ด๊ฒ์ด ๋๋ฅผ ๋์์ต๋๋ค.
set "NODE_TLS_REJECT_UNAUTHORIZED=0"
๊ทธ๋ฐ ๋ค์ Firebase ๋ก๊ทธ์ธ์ ๋ค์ ์คํํ์ญ์์ค.