Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I’m running into a interesting problem…
I need to clone a private git repo during a docker build. To do this, I’m passing my ssh keys from my local machine (mac pro) into the image using build-arg. Keys have been added to git. This process works locally.
I’m now trying to replicate this process with an ubuntu VM as the docker host. I’ve generated keys and am able to connect to git and clone from the repo from the ubuntu host. However, when passing the keys during the docker build it errors out. docker image is node:9 Anyone have an idea of what would cause this?
npm ERR!
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128 (edited)`
SOLVED!
created config file under ~/.ssh/
Host <url>
User git
StrictHOstKeyChecking no
Related
I have a Ubuntu server running Apache Tomcat with SSL for a domain (e.g abc.xyz). In that server, I also set up Docker for deploying Next.js. However, when I build a container for a demo application, it shows error:
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.org/#types%2fnode failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:*.abc.xyz, DNS:abc.xyz
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-06T15_27_49_018Z-debug.log
I tried many solutions like setting strict-ssl=false, setting registry (you can see it in my repository), changing DNS nameserver to OpenDNS but they don't work.
I also tried to run command npm install outside Docker and it still works.
Repository URL here.
Updated: This error doesn't occur not only in Nodejs but also in Java. I built a Dockerfile that contains RUN mvn package and it shows the same error
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6:
Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom:
Certificate for <repo.maven.apache.org> doesn't match any of the subject alternative names: [*.abc.xyz, abc.xyz] -> [Help 1]
When I create a brand new create-react-app and run the command yarn add electron --dev I get the following error.
RequestError: unable to get local issuer certificate
at ClientRequest.<anonymous> (C:\my-stuff\create-react-test\node_modules\got\source\request-as-event-emitter.js:178:14)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:412:35)
at ClientRequest.origin.emit (C:\my-stuff\create-react-test\node_modules\#szmarczak\http-timer\source\index.js:37:11)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
The same thing happens with npm and chocolatey and only with electron. This doesn't happen on other computers. I've completely uninstalled node and reinstalled it.
This happens after it finished downloading the module. It is making a ClientRequest to a location on my computer. I don't understand why.
I've searched the internet for days for a solution. I've found the cnpm solution and it does work, but I want my project to be restorable from the git repository using npm install or yarn. Right now it is not. I'd have to remove electron from my package.json, restore, add it back and call the cnpm command.
npm config set strict-ssl false <- This command does not help.
I've tried separately installing got and #szmarczak\http-timer. This did not help.
I know it's old question but if anyone is facing this issue try running yarn config set enableStrictSsl false
This question already has answers here:
Network calls fail during image build on corporate network
(9 answers)
Closed 3 years ago.
I am trying to run fabcar sample using javascript chaincode,it fails with the following error while instantiating the chaincode
error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443
please help me regarding this...
It is happenning for all fabric samples whenever i try to run in javascript/typescript
thanks in advance
When you instantiate a Javascript Smart Contract the Fabric creates a chaincode container and installs your Javascript contract (or sample) AND all the npm dependencies. This means that an npm registry with those modules must be accessible.
I suspect that you are behind a corporate proxy/firewall, or working in a region where there is no direct access to npm. On your host machine you probably have a .npmrc file which helps with the proxy, and you need to replicate that for the chaincode.
I think you need to place the .npmrc file in the root folder of your Smart Contract project - i.e. in the same folder as the package.json file.
I have developed a small "proof of concept" ApostropheCMS application. The application runs fine with node app.js. I'm trying to build and deploy with Docker for Windows on Windows 7 with Oracle VM VirtualBox following this tutorial.
I am able to deploy the mongo image. I am able to build my application image using the default Dockerfile. When I attempt to run my application, docker image linked with the mongo image I receive the following error:
$ docker run --link=ato-home-db:mongodb -p 3000:3000 ato-home-webapp
ato-home-webapp#2.0.0 start /app node app.js fs.js:1014 return
binding.symlink(preprocessSymlinkDestination(target, type, path),
^ Error: EEXIST: file already exists, symlink '/app/node_modules/apostrophe/lib/modules/apostrophe-assets/public' ->
'/app/public/modules/apostrophe-assets'
at Object.fs.symlinkSync (fs.js:1014:18)
at Object.self.linkAssetFolderOnUnix (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:646:10)
at Object.self.linkAssetFolder (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:612:14)
at /app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:578:14
at /app/node_modules/#sailshq/lodash/lib/index.js:3253:15
at baseForOwn (/app/node_modules/#sailshq/lodash/lib/index.js:2223:14)
at /app/node_modules/#sailshq/lodash/lib/index.js:3223:18
at Function. (/app/node_modules/#sailshq/lodash/lib/index.js:3526:13)
at self.symlinkModules (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:574:9)
at /app/node_modules/async/lib/async.js:718:13
at iterate (/app/node_modules/async/lib/async.js:262:13)
at async.forEachOfSeries.async.eachOfSeries (/app/node_modules/async/lib/async.js:281:9)
at _parallel (/app/node_modules/async/lib/async.js:717:9)
at Object.async.series (/app/node_modules/async/lib/async.js:739:9)
at Object.self.afterInit (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:521:20)
at invoke (/app/node_modules/apostrophe/index.js:423:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ato-home-webapp#2.0.0 start:
node app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the
ato-home-webapp#2.0.0 start script. npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
/root/.npm/_logs/2018-08-07T00_15_24_396Z-debug.log
I'm hoping for a possible solution or suggestions for ApostropheCMS tutorials or "How Tos" to get past this roadblock.
I am new to ApostropheCMS and Docker. Any input would be greatly appreciated. I can supply additional information if helpful.
I'm going to assume that you're building your image on Windows (to a Linux container). Please try rebuilding your image in a Unix environment.
I am building a hybrid mobile app (Cordova) and I am trying to run my build on iOS.
I have followed the steps in this documentation to setup my connected Mac and I can see that the Mac terminal responding when I try to build my code in visual studio.
My issue is that when ever I enable the remote build server using remotebuild --secure false I get the following error in visual studio output(notice that the terminal is responding to the build request from visual studio but then fails with errors):
Non-secure connection to http://192.168.1.10:3000/cordova could not be established. Verify that the build server is not running in secure mode.
And here is the Mac terminal activity with and output:
Last login: Tue Aug 18 19:31:21 on ttys001
IBRAHIM-ALHUSSAINs-Mac-mini:~ IBRAHIMALHUSSAIN$ remotebuild --secure false
remotebuild
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
1.0.1
Warning: No server modules selected. Defaulting to configuration "modules": {"taco-remote": { "mountPath": "cordova"} }
Build Retention initialized with baseBuildDir /Users/IBRAHIMALHUSSAIN/.taco_home/remote-builds/taco-remote/builds, maxBuildsToKeep 20
Initialized BuildManager with baseBuildDir /Users/IBRAHIMALHUSSAIN/.taco_home/remote-builds/taco-remote/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 423
Remote build server listening on [http] port 3000
express deprecated req.host: Use req.hostname instead ../../usr/local/lib/node_modules/remotebuild/lib/server.js:257:81
GET /modules/taco-remote 200 14.494 ms - 7
New build request submitted:
/build/tasks?command=build&vcordova=4.3.0&cfg=debug&loglevel=warn
{ 'accept-language': 'en-US',
host: '192.168.1.10:3000',
connection: 'close',
'transfer-encoding': 'chunked' }
POST /cordova/build/tasks?command=build&vcordova=4.3.0&cfg=debug&loglevel=warn - - ms - -
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "taco-remote-multiplexer"
npm ERR! node v0.12.4
npm ERR! npm v2.13.4
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! /Users/IBRAHIMALHUSSAIN/.taco_home/node_modules/taco-remote-multiplexer/latest/npm-debug.log
I remember reading somewhere that I should enable secure build once then disable it in order to initialize the remote server security configuration. Whenever I try to run in secure build mode remotebuild I would get this error:
Secure connection to https://192.168.1.10:3000/cordova could not be established. Verify that the build server is running in secure mode.
I have also attempted to resolve this issue by recreating PIN, generating and resetting the certificate.
How can I resolve this issue?
From the console output that you've included there, it looks like your mac can't access the npm repository:
npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org
The line stating
New build request submitted
indicates that visual studio has successfully connected to the remotebuild server and has sent over a project to be built. As part of building a project, remotebuild dynamically acquires some npm packages to make sure that it is future proof and can work with multiple different versions of Cordova.
If you are unable or unwilling to let your mac see the npm repository, then it is possible to provide your own substitute function that determines what package to load to actually build the project.
I strongly recommend against doing this, but here is the simplest way to remove the functionality:
On a machine with access to npm, "npm install taco-remote-lib" to download the default package that performs cordova builds for remotebuild, then within that "npm install cordova#<version>" for the single version you intend to use. Open up taco-remote-lib/ios/iosBuild.js and replace
TacoPackageLoader.lazyRequire("cordova", "cordova#" + cordovaVersion, buildInfo.logLevle).done(function pkg) {
cordova = pkg;
with
cordova = require("cordova");
and remove the "}, function (err) { [...] })" at the end of the function you removed.
Copy the whole taco-remote-lib folder onto the mac, as it is now a self-contained instance which is specialised to a particular cordova version
Create a new js file somewhere "myRedirector.js", and give it contents similar to the following:
.
module.exports.getPackageToServeRequest = function (request) {
return require("/path/to/copied/taco-remote-lib");
}
Create a configuration file that looks something like the following:
.
{
"modules": {
"taco-remote": {
"requirePath": "taco-remote",
"mountPath": "cordova",
"redirector": "/path/to/myRedirector.js",
}
}
}
Start remotebuild by running "remotebuild --config path/to/the/config.json"
This should start remotebuild with a custom request redirector that uses your custom modified taco-remote-lib package to build all requests.
This will not respect the version of cordova that VS specifies for builds, since that requires the ability to download those versions from NPM on demand.
perhaps because of OS have Sandbox system
In my case I had "'" in my mac's name. It did connect by host name once I removed "'".