package.json 中的私有 github repo 破坏了 azure 网站部署

package.json 中的私有 github repo 破坏了 azure 网站部署

尝试通过 Github 在 Azure“网站”上部署 Express 应用程序。我在package.json依赖项中有一个私有存储库:

"dependencies": {
  "express: "~3.4.0",
   ...
  "private-repo": "git+ssh://[email protected]:private/repo.git"
}

不幸的是,这是堆栈跟踪:

Command: C:\DWASFiles\Sites\website002\VirtualDirectory0\site\deployments\tools\deploy.cmd
Handling node.js deployment.
KuduSync.NET from: 'C:\DWASFiles\Sites\website002\VirtualDirectory0\site\repository' to: 'C:\DWASFiles\Sites\website002\VirtualDirectory0\site\wwwroot'
Copying file: 'package.json'
Missing server.js/app.js files, web.config is not generated
Node.js versions available on the platform are: 0.10.18, 0.10.5, 0.6.17, 0.6.20, 0.8.19, 0.8.2.
Selected node.js version 0.10.18. Use package.json file to choose a different version.
npm http GET https://registry.npmjs.org/express
...
npm WARN `git config --get remote.origin.url` returned wrong result ([email protected]:private/repo.git) fatal: Cannot change to 'C:/DWASFiles/Sites/website002/..': Permission denied
npm http 304 https://registry.npmjs.org/express
...
npm ERR! git clone [email protected]:private/repo.git Cloning into bare repository 'C:\DWASFiles\Sites\website002\AppData\npm-cache\_git-remotes\git-github-com-private-repo-git-63672f8b'...
npm ERR! git clone [email protected]:private/repo.git 
npm ERR! git clone [email protected]:private/repo.git Could not create directory '/c/DWASFiles/Sites/website002/UserProfile/.ssh'.
npm ERR! git clone [email protected]:private/repo.git Host key verification failed.
An error has occurred during web site deployment.
npm ERR! git clone [email protected]:private/repo.git fatal: The remote end hung up unexpectedly
npm ERR! Error: Command failed: Could not create directory '/c/DWASFiles/Sites/website002/UserProfile/.ssh'.
npm ERR! Host key verification failed.
npm ERR! fatal: The remote end hung up unexpectedly
npm ERR! 
npm ERR!     at ChildProcess.exithandler (child_process.js:637:15)
npm ERR!     at ChildProcess.EventEmitter.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:735:16)
npm ERR!     at Process.ChildProcess._handle.onexit (child_process.js:802:5)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.18\\node.exe" "D:\\Program Files (x86)\\npm\\1.3.8\\bin\\npm-cli.js" "install" "--production"
npm ERR! cwd C:\DWASFiles\Sites\website002\VirtualDirectory0\site\wwwroot
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR! code 128

答案1

也许已经太晚了,但它正在寻找你想要从中恢复站点的存储库的 URL,“git+ssh://[电子邮件保护]:username/nameofrepo.git 其中你输入的是“git+ssh://[电子邮件保护]:private/repo.git"。

如果对你来说已经太晚了,我希望这能够对某人有所帮助。

相关内容