Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having issues with proxy behind firewall #372

Open
stevewirts opened this issue Feb 5, 2016 · 1 comment
Open

Having issues with proxy behind firewall #372

stevewirts opened this issue Feb 5, 2016 · 1 comment

Comments

@stevewirts
Copy link

I've read through all the proxy issues and adjusted things properly (I believe), It still seems as though sinopia is ignoring the proxy settings, I cannot add users, or pull npm packages from external source...

here's the error
$ npm adduser --registry http://localhost:4873/
Username: swirts
Password:
Email: (this IS public) [email protected]
npm ERR! registry error parsing json
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\swirts\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\n
pm-cli.js" "adduser" "--registry" "http://localhost:4873/"
npm ERR! node v5.0.0
npm ERR! npm  v3.5.3

npm ERR! Unexpected token <
npm ERR! <HTML>
npm ERR! <HEAD><TITLE>Redirection</TITLE></HEAD>
npm ERR! <BODY><H1>Redirect</H1></BODY>
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Projects\test\npm-debug.log

------------------------------------------------------------------------------

here is npm config
$ npm config ls -l
; cli configs
long = true
user-agent = "npm/3.5.3 node/v5.0.0 win32 x64"

; userconfig C:\Users\swirts\.npmrc
registry = "http://localhost:4873/"
strict-ssl = false

; builtin config undefined
prefix = "C:\\Users\\swirts\\AppData\\Roaming\\npm"

; default values
access = null
also = null
always-auth = false
bin-links = true
browser = null
ca = null
cache = "C:\\Users\\swirts\\AppData\\Roaming\\npm-cache"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
color = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "C:\\Users\\swirts\\AppData\\Roaming\\npm\\etc\\npmrc"
globalignorefile = "C:\\Users\\swirts\\AppData\\Roaming\\npm\\etc\\npmignore"
group = 0
heading = "npm"
https-proxy = null
if-present = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\\Users\\swirts\\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "warn"
; long = false (overridden)
message = "%s"
node-version = "5.0.0"
npat = false
onload-script = null
only = null
optional = true
parseable = false
; prefix = "C:\\Program Files\\nodejs" (overridden)
production = false
progress = true
proprietary-attribs = true
proxy = null
rebuild-bundle = true
; registry = "https://registry.npmjs.org/" (overridden)
rollback = true
save = false
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
scope = ""
searchexclude = null
searchopts = ""
searchsort = "name"
shell = "C:\\Windows\\system32\\cmd.exe"
shrinkwrap = true
sign-git-tag = false
; strict-ssl = true (overridden)
tag = "latest"
tag-version-prefix = "v"
tmp = "C:\\cygwin64\\tmp"
umask = 0
unicode = true
unsafe-perm = true
usage = false
user = 0
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "C:\\Users\\swirts\\.npmrc"
version = false
versions = false
viewer = "browser"

--------------------------------------------------------------
.npmrc
strict-ssl=false
registry=http://localhost:4873

------------------------------------------------------------------------
config.yaml
#
# This is the default config file. It allows all users to do anything,
# so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/rlidwka/sinopia/tree/master/conf
#

# path to a directory with all packages
storage: ./storage

auth:
  htpasswd:
    file: ./htpasswd
    # Maximum amount of users allowed to register, defaults to "+inf".
    # You can set this to -1 to disable registration.
    #max_users: 1000

# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/

packages:
  '@*/*':
    # scoped packages
    access: $all
    publish: $authenticated

  '*':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access: $all

    # allow all known users to publish packages
    # (anyone can register by default, remember?)
    publish: $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: npmjs

# log settings
logs:
  - {type: stdout, format: pretty, level: http}
  #- {type: file, path: sinopia.log, level: info}

http_proxy: http://corporateproxy.kcg.com:8080
https_proxy: http://corporateproxy.kcg.com:8080
no_proxy: localhost,127.0.0.1

---------------------------------------------------------------------------------------
Environment Variables...
http_proxy= http://corporateproxy.kcg.com:8080
https_proxy= http://corporateproxy.kcg.com:8080
proxy= http://corporateproxy.kcg.com:8080

--------------------------------------------------------------------
npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\swirts\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'adduser',
1 verbose cli   '--registry',
1 verbose cli   'http://localhost:4873/' ]
2 info using [email protected]
3 info using [email protected]
4 verbose adduser before first PUT { _id: 'org.couchdb.user:swirts',
4 verbose adduser   name: 'swirts',
4 verbose adduser   password: 'XXXXX',
4 verbose adduser   email: '[email protected]',
4 verbose adduser   type: 'user',
4 verbose adduser   roles: [],
4 verbose adduser   date: '2016-02-05T17:35:47.890Z' }
5 verbose request uri http://localhost:4873/-/user/org.couchdb.user:swirts
6 verbose request new user, so can't send auth
7 info attempt registry request try #1 at 12:35:47 PM
8 verbose request id 455e7db7612a8275
9 http request PUT http://localhost:4873/-/user/org.couchdb.user:swirts
10 http 301 http://localhost:4873/-/user/org.couchdb.user:swirts
11 verbose bad json <HTML>
11 verbose bad json <HEAD><TITLE>Redirection</TITLE></HEAD>
11 verbose bad json <BODY><H1>Redirect</H1></BODY>
12 error registry error parsing json
13 verbose headers { server: 'Security-Appliance',
13 verbose headers   location: 'http://11.11.11.11',
13 verbose headers   connection: 'Close' }
14 verbose request invalidating C:\Users\swirts\AppData\Roaming\npm-cache\localhost_4873\-\user\org.couchdb.user_3Aswirts on PUT
15 verbose adduser back [ [SyntaxError: Unexpected token <
15 verbose adduser   <HTML>
15 verbose adduser   <HEAD><TITLE>Redirection</TITLE></HEAD>
15 verbose adduser   <BODY><H1>Redirect</H1></BODY>
15 verbose adduser   ],
15 verbose adduser   null,
15 verbose adduser   '<HTML>\r\n<HEAD><TITLE>Redirection</TITLE></HEAD>\r\n<BODY><H1>Redirect</H1></BODY>\r\n' ]
16 verbose stack SyntaxError: Unexpected token <
16 verbose stack <HTML>
16 verbose stack <HEAD><TITLE>Redirection</TITLE></HEAD>
16 verbose stack <BODY><H1>Redirect</H1></BODY>
16 verbose stack
16 verbose stack     at Object.parse (native)
16 verbose stack     at CachingRegistryClient.<anonymous> (C:\Users\swirts\AppData\Roaming\npm\node_modules\npm\node_modules\npm-registry-client\lib\request.js:199:23)
16 verbose stack     at Request._callback (C:\Users\swirts\AppData\Roaming\npm\node_modules\npm\node_modules\npm-registry-client\lib\request.js:172:14)
16 verbose stack     at Request.self.callback (C:\Users\swirts\AppData\Roaming\npm\node_modules\npm\node_modules\request\request.js:198:22)
16 verbose stack     at emitTwo (events.js:87:13)
16 verbose stack     at Request.emit (events.js:172:7)
16 verbose stack     at Request.<anonymous> (C:\Users\swirts\AppData\Roaming\npm\node_modules\npm\node_modules\request\request.js:1035:10)
16 verbose stack     at emitOne (events.js:82:20)
16 verbose stack     at Request.emit (events.js:169:7)
16 verbose stack     at IncomingMessage.<anonymous> (C:\Users\swirts\AppData\Roaming\npm\node_modules\npm\node_modules\request\request.js:962:12)
17 verbose cwd C:\Projects\test
18 error Windows_NT 6.1.7601
19 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\swirts\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "adduser" "--registry" "http://localhost:4873/"
20 error node v5.0.0
21 error npm  v3.5.3
22 error Unexpected token <
22 error <HTML>
22 error <HEAD><TITLE>Redirection</TITLE></HEAD>
22 error <BODY><H1>Redirect</H1></BODY>
23 error If you need help, you may report this error at:
23 error     <https://github.com/npm/npm/issues>
24 verbose exit [ 1, true ]


-----------------------------------------------------------------------------------------
any help would be much appreciated...
thanks
@excenter
Copy link

excenter commented Feb 8, 2016

Working on the same issue, there's a PR that's supposed to fix it:
#268
but it hasn't been pulled in for some reason.
ATM, I'm going to have to add the stuff to my own repo because I can't wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants