2017-01-28 22 views
0

Я пытаюсь создать надстройку офиса с помощью генератора yoman. Я следую инструкциям по адресу https://dev.office.com/docs/add-ins/get-started/create-an-office-add-in-using-any-editor.Yeoman офисный генератор не умеет клонировать libxml2 repo на Windows 7

При выполнении yo office, появляется следующее сообщение.

Command failed: git -c core.longpaths=true submodule -q update --init --recursive 
fatal: https://git.gnome.org/libxml2/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server? 
Clone of 'git://git.gnome.org/libxml2' into submodule path 'libxml2' failed 

Вот полный лог:

d:\Projects\295_Office365ExcelAddin\myHelloWorldaddin>yo office 

    _-----_  ?──────────────────────────? 
    |  | │ Welcome to the Office │ 
    |--(o)--| │ Project generator, by │ 
    `---------' │ @OfficeDev! Let's create │ 
    (_'U`_) │ a project together! │ 
    /___A___\ /?──────────────────────────? 
    | ~ | 
    __'.___.'__ 
' ` |° ' Y ` 

? Project name (display name): myHelloWorldaddin 
? Root folder of project? Default to current directory 
(d:\Projects\295_Office365ExcelAddin\myHelloWorldaddin), or specify relative path 
from current (src/public): . 
? Office project type: Task Pane Add-in 
? Supported Office applications: Excel 
? Technology to use: HTML, CSS & JavaScript 
    create bower.json 
    create package.json 
    create tsd.json 
    create .bowerrc 
    create gulpfile.js 
    create content\Office.css 
    create images\close.png 
    create images\logo-filled.png 
    create scripts\MicrosoftAjax.js 
    create jsconfig.json 
    create tsconfig.json 
    create manifest-myhelloworldaddin.xml 
    create manifest.xsd 
    create app\app.css 
    create app\app.js 
    create app\home\home.html 
    create app\home\home.css 
    create app\home\home.js 
npm ERR! git submodule -q update --init --recursive: fatal: https://git.gnome.org/libxml2/info/refs?service=git-upload-pack not found: did you run git update-server-info 
on the server? 
npm ERR! git submodule -q update --init --recursive: Clone of 'git://git.gnome.org/libxml2' into submodule path 'libxml2' failed 
npm ERR! git submodule -q update --init --recursive: 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "D:\\ProgramFiles\\nodejs\\node.exe" "D:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v7.4.0 
npm ERR! npm v4.0.5 
npm ERR! code 1 

npm ERR! Command failed: git -c core.longpaths=true submodule -q update --init --recursive 
npm ERR! fatal: https://git.gnome.org/libxml2/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server? 
npm ERR! Clone of 'git://git.gnome.org/libxml2' into submodule path 'libxml2' failed 
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!  d:\Projects\295_Office365ExcelAddin\myHelloWorldaddin\npm-debug.log 

Любой ключ, почему это может происходить?

Edit: протокол Git заблокирован на моем рабочем месте, поэтому я добавил следующее в моем .gitconfig.

[url "https://"] 
    insteadOf = "git://" 

ответ

0

Я обнаружил, что https URL для мерзавца: //git.gnome.org/libxml2 НЕ https://git.gnome.org/libxml2. Это https://git.gnome.org/browse/libxml2

В итоге я добавил следующее в свой файл .gitconfig.

[url "https://git.gnome.org/browse/"] 
    insteadOf = "git://git.gnome.org/" 
[url "https://"] 
    insteadOf = "git://" 

С этими настройками он работает нормально.

+0

Странно .. https://git.gnome.org/libxml2 фактически разрешает https://git.gnome.org//browse/libxml2, когда я пытаюсь ударить его в браузере. Вы знаете, какую версию git вы используете? –

+0

Я только видел «git subodule sync && git subodule update --init --recursive» эта команда терпит неудачу при возникновении проблем с брандмауэром/прокси. Также делает 'cd/tmp/&& git clone git: //git.gnome.org/libxml2' что-нибудь делать? –

+0

@BethPan Я использую "мерзавец версии 1.8.1.msysgit.1" – dips