Nazehs
Nazehs

Reputation: 558

publishing angular 6 application in github pages

I have been battling with getting my application up and running in github pages.

i have a hosted repo which i used for testing purpose and i have follow all the steps needed to get the application up and running but all effort avail abortive

after this point i am getting the below errors


An error occurred! Error: Unspecified error (run without silent option for detail) at C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages\lib\index.js:232:19 at _rejected (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:844:24) at C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:870:30 at Promise.when (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:1122:31) at Promise.promise.promiseDispatch (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:788:41) at C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:604:44 at runSingle (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:137:13) at flush (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\q\q.js:125:13) at process._tickCallback (internal/process/next_tick.js:150:11)

i have also tried all possible suggestions online but none worked for me... pls i need help in what i am doing wrong.

update as requested


C:\Users\TOSHIBA\Desktop\Angular\application>ngh --no-silent Cloning https://github.com/Nazehs/application.git into ......\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages.cache

An error occurred! { ProcessError: Cloning into '......\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages.cache'... fatal: unable to access 'https://github.com/Nazehs/application.git/': Couldn't resolve host 'github.com'

at ChildProcess.<anonymous> (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages\lib\git.js:47:23)
at ChildProcess.emit (events.js:160:13)
at maybeClose (internal/child_process.js:943:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

code: 128, message: 'Cloning into \'..\..\..\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages\.cache\'...\nfatal: unable to access \'https://github.com/Nazehs/application.git/\': Couldn\'t resolve host \'github.com\'\n', name: 'ProcessError' }

new output of the result


Cleaning

Fetching origin

Checking out origin/gh-pages

Removing files

Copying files

Adding all

An error occurred! { ProcessError: warning: LF will be replaced by CRLF in 3rdpartylicenses.txt. The file will have its original line endings in your working directory. error: open("karma.conf.js"): Permission denied error: unable to index file karma.conf.js fatal: adding files failed

at ChildProcess.<anonymous> (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages\lib\git.js:47:23)
at ChildProcess.emit (events.js:160:13)
at maybeClose (internal/child_process.js:943:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

code: 128, message: 'warning: LF will be replaced by CRLF in 3rdpartylicenses.txt.\nThe file will have its original line endings in your working directory.\nerror: open("karma.conf.js"): Permission denied\nerror: unable to index file karma.conf.js\nfatal: adding files failed\n', name: 'ProcessError' }

new error


Pushing

An error occurred! { ProcessError: fatal: HttpRequestException encountered. An error occurred while sending the request. bash: /dev/tty: No such device or address error: failed to execute prompt script (exit code 1) fatal: could not read Username for 'https://github.com': No error

at ChildProcess.<anonymous> (C:\Users\nazehab\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_modules\gh-pages\lib\git.js:47:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)

code: 128, message: 'fatal: HttpRequestException encountered.\n An error occurred while sending the request.\r\nbash: /dev/tty: No such device or address\nerror: failed to execute prompt script (exit code 1)\nfatal: could not read Username for \'https://github.com\': No error\n', name: 'ProcessError' }

Upvotes: 0

Views: 824

Answers (1)

Aritra Chakraborty
Aritra Chakraborty

Reputation: 12542

The error is because of incorrect proxy settings. So, if you have proxy you have to add it to the git config or environment variables.

set HTTPS_PROXY=http://<login>:<password>@proxy:port
set HTTP_PROXY=http://<login>:<password>@proxy:port
set NO_PROXY=localhost,my.company

Note the NO_PROXY, to allow to access internal site to your company

You also can register that in your git config:

git config --global http.proxy http://<login>:<password>@proxy:port

OR, if you don't have proxy you can try to unset the proxy settings

git config --global --unset http.proxy

https version:

git config --global --unset https.proxy

Upvotes: 1

Related Questions