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

以git方式发布到gitcafe失败,No goals have been specified for this build! #9

Closed
sconfield opened this Issue Jan 25, 2014 · 11 comments

Comments

Projects
None yet
2 participants
@sconfield

第一次使用opoopress,想把blog发布到gitcafe上去,多次尝试失败。求指导!
错误信息如下:
$ mvn -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.307s
[INFO] Finished at: Sat Jan 25 18:46:29 CST 2014
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
org.apache.maven.lifecycle.NoGoalSpecifiedException: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:104)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

@opoo

This comment has been minimized.

Show comment
Hide comment
@opoo

opoo Jan 27, 2014

Owner

maven 命令通常是 mvn [goal ]··· 的格式,执行需要指定goal,例如 mvn op:build, build 就是个 goal,op 是 goal 的前缀。

Owner

opoo commented Jan 27, 2014

maven 命令通常是 mvn [goal ]··· 的格式,执行需要指定goal,例如 mvn op:build, build 就是个 goal,op 是 goal 的前缀。

@sconfield

This comment has been minimized.

Show comment
Hide comment
@sconfield

sconfield Jan 27, 2014

好的,回去研究下maven,我是 mvn op:deploy 失败的。
Sent using CloudMagic
On 周一, 1月 27, 2014 at 5:30 下午, Alex Lin notifications@github.com wrote:maven 命令通常是 mvn [goal ]··· 的格式,执行需要指定

—Reply to this email directly or view it on GitHub.

好的,回去研究下maven,我是 mvn op:deploy 失败的。
Sent using CloudMagic
On 周一, 1月 27, 2014 at 5:30 下午, Alex Lin notifications@github.com wrote:maven 命令通常是 mvn [goal ]··· 的格式,执行需要指定

—Reply to this email directly or view it on GitHub.

@opoo

This comment has been minimized.

Show comment
Hide comment
@opoo

opoo Jan 27, 2014

Owner

mvn op:deploy 的错误消息贴上来看看,可能由于 deploy_server 配置问题。

Owner

opoo commented Jan 27, 2014

mvn op:deploy 的错误消息贴上来看看,可能由于 deploy_server 配置问题。

@sconfield

This comment has been minimized.

Show comment
Hide comment
@sconfield

sconfield Jan 27, 2014

用家里平板搭建的博客,回家后就立马传上来,望大侠方便的时候指点一下,谢谢!
Sent using CloudMagic
On 周一, 1月 27, 2014 at 5:44 下午, Alex Lin notifications@github.com wrote:将 mvn op:deploy 的错误消息贴上来看看,可能由于 deploy_server 配置问题。

—Reply to this email directly or view it on GitHub.

用家里平板搭建的博客,回家后就立马传上来,望大侠方便的时候指点一下,谢谢!
Sent using CloudMagic
On 周一, 1月 27, 2014 at 5:44 下午, Alex Lin notifications@github.com wrote:将 mvn op:deploy 的错误消息贴上来看看,可能由于 deploy_server 配置问题。

—Reply to this email directly or view it on GitHub.

@sconfield

This comment has been minimized.

Show comment
Hide comment
@sconfield

sconfield Jan 27, 2014

$ mvn op:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My OpooPress.com site 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- opoopress-maven-plugin:1.0.3:deploy (default-cli) @ my-opoopress-site ---
[INFO] The site directory is : c:\Users\静\Documents\Blog\site
[INFO] Skipping install, site already installed.
[INFO] Skipping sass compile, css file is up to date.
[INFO] Skipping generate, all output files are up to date.
[INFO] Destination [c:\Users\静\Documents\Blog\target\public\site]
[INFO] Site root []
scm:git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Opened
[INFO] Pushing c:\Users\静\Documents\Blog\target\public\site
[INFO] >>> to scm:git:https://gitcafe.com/sconfield/sconfield.git/./
Uploading: ./ to scm:git:https://gitcafe.com/sconfield/sconfield.git/

[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: c:\Users\静\Documents\Blog.
[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: c:\Users\静\Documents\Blog.
[INFO] Executing: cmd.exe /X /C "git clone https://gitcafe.com/sconfield/sconfield.git/ C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp
[INFO] Executing: cmd.exe /X /C "git pull https://gitcafe.com/sconfield/sconfield.git/ master"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout
[INFO] Executing: cmd.exe /X /C "git checkout"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout
[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout
scm:git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnecting
scm:git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.699s
[INFO] Finished at: Mon Jan 27 19:05:45 CST 2014
[INFO] Final Memory: 6M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.opoo.press.maven.plugins:opoopress-maven-plugin:1.0.3:deploy (default-cli) on project my-opoopress-site: Error uploading site
: Failed to create directory C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout.; parent should exist: C:\Users\静\AppData\Local\Temp\wagon-scm1664950
111.checkout -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

$ mvn op:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My OpooPress.com site 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- opoopress-maven-plugin:1.0.3:deploy (default-cli) @ my-opoopress-site ---
[INFO] The site directory is : c:\Users\静\Documents\Blog\site
[INFO] Skipping install, site already installed.
[INFO] Skipping sass compile, css file is up to date.
[INFO] Skipping generate, all output files are up to date.
[INFO] Destination [c:\Users\静\Documents\Blog\target\public\site]
[INFO] Site root []
scm:git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Opened
[INFO] Pushing c:\Users\静\Documents\Blog\target\public\site
[INFO] >>> to scm:git:https://gitcafe.com/sconfield/sconfield.git/./
Uploading: ./ to scm:git:https://gitcafe.com/sconfield/sconfield.git/

[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: c:\Users\静\Documents\Blog.
[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: c:\Users\静\Documents\Blog.
[INFO] Executing: cmd.exe /X /C "git clone https://gitcafe.com/sconfield/sconfield.git/ C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp
[INFO] Executing: cmd.exe /X /C "git pull https://gitcafe.com/sconfield/sconfield.git/ master"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout
[INFO] Executing: cmd.exe /X /C "git checkout"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout
[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout
scm:git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnecting
scm:git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.699s
[INFO] Finished at: Mon Jan 27 19:05:45 CST 2014
[INFO] Final Memory: 6M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.opoo.press.maven.plugins:opoopress-maven-plugin:1.0.3:deploy (default-cli) on project my-opoopress-site: Error uploading site
: Failed to create directory C:\Users\静\AppData\Local\Temp\wagon-scm1664950111.checkout.; parent should exist: C:\Users\静\AppData\Local\Temp\wagon-scm1664950
111.checkout -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@opoo

This comment has been minimized.

Show comment
Hide comment
Owner

opoo commented Jan 27, 2014

可能是这个问题 http://www.opoopress.com/zh/docs/github-pages/#wagon-scm--maven-scm-provider-gitexe-known-issues

试试第二种方式 opoopress-wagon-git

@sconfield

This comment has been minimized.

Show comment
Hide comment
@sconfield

sconfield Jan 27, 2014

ssh密钥我早已配置过。
$ ssh -T git@gitcafe.com
Enter passphrase for key '/c/Users/静/.ssh/gitcafe':
Hi sconfield! You've successfully authenticated, but GitCafe does not provide shell access.
我注释掉不相关的extension,只留下了opoopress-wagon-git。和不注释的报错信息一样。如下:
$ mvn op:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My OpooPress.com site 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- opoopress-maven-plugin:1.0.3:deploy (default-cli) @ my-opoopress-site ---
[INFO] The site directory is : c:\Users\静\Documents\Blog\site
[INFO] Skipping install, site already installed.
[INFO] Skipping sass compile, css file is up to date.
[INFO] No last generate info, regenerate site.
[INFO] Reading sources ...
[INFO] Rendering ...
[INFO] Writing files ...
[INFO] Writing 1 posts
[INFO] Writing 14 pages
[INFO] Copying 1 assets directory
[INFO] Generate time: 4169ms
[INFO] Destination [c:\Users\静\Documents\Blog\target\public\site]
[INFO] Site root []
git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Opened
[INFO] Pushing c:\Users\静\Documents\Blog\target\public\site
[INFO] >>> to git:https://gitcafe.com/sconfield/sconfield.git/./
Uploading: ./ to git:https://gitcafe.com/sconfield/sconfield.git/

[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git clone https://gitcafe.com/sconfield/sconfield.git C:\Users\静
\AppData\Local\Temp\wagon-git1012732376.checkout"
[INFO] [git] Cloning into 'C:\Users\闈橽AppData\Local\Temp\wagon-git1012732376.checkout'...
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git checkout"
[INFO] [git] Your branch is up-to-date with 'origin/master'.
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git ls-files"
[INFO] [git] .gitignore
[INFO] [git] README.md
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git add ."
[INFO] [git] warning: LF will be replaced by CRLF in about/index.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in article/2014/01/hello-world/index.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in atom.xml.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in index.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in sample-page.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git commit --allow-empty -m "GitHubWagon: Deploying OpooPress to
GitHub Pages.""
[INFO] [git]
[INFO] [git] *** Please tell me who you are.
[INFO] [git]
[INFO] [git] Run
[INFO] [git]
[INFO] [git] git config --global user.email "you@example.com"
[INFO] [git] git config --global user.name "Your Name"
[INFO] [git]
[INFO] [git] to set your account's default identity.
[INFO] [git] Omit --global to set the identity only in this repository.
[INFO] [git]
[INFO] [git] fatal: unable to auto-detect email address (got '静@sconfield.(none)')
Transfer error: org.opoo.press.maven.wagon.git.GitException: Unable to commit files
git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnecting
git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.255s
[INFO] Finished at: Wed Jan 29 11:29:32 CST 2014
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.opoo.press.maven.plugins:opoopress-maven-plugin:1.0.3:deploy (default-cli) on project my-opoopress-site: Error uploading site
: Unable to put file: Unable to commit files -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

ssh密钥我早已配置过。
$ ssh -T git@gitcafe.com
Enter passphrase for key '/c/Users/静/.ssh/gitcafe':
Hi sconfield! You've successfully authenticated, but GitCafe does not provide shell access.
我注释掉不相关的extension,只留下了opoopress-wagon-git。和不注释的报错信息一样。如下:
$ mvn op:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My OpooPress.com site 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- opoopress-maven-plugin:1.0.3:deploy (default-cli) @ my-opoopress-site ---
[INFO] The site directory is : c:\Users\静\Documents\Blog\site
[INFO] Skipping install, site already installed.
[INFO] Skipping sass compile, css file is up to date.
[INFO] No last generate info, regenerate site.
[INFO] Reading sources ...
[INFO] Rendering ...
[INFO] Writing files ...
[INFO] Writing 1 posts
[INFO] Writing 14 pages
[INFO] Copying 1 assets directory
[INFO] Generate time: 4169ms
[INFO] Destination [c:\Users\静\Documents\Blog\target\public\site]
[INFO] Site root []
git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Opened
[INFO] Pushing c:\Users\静\Documents\Blog\target\public\site
[INFO] >>> to git:https://gitcafe.com/sconfield/sconfield.git/./
Uploading: ./ to git:https://gitcafe.com/sconfield/sconfield.git/

[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git clone https://gitcafe.com/sconfield/sconfield.git C:\Users\静
\AppData\Local\Temp\wagon-git1012732376.checkout"
[INFO] [git] Cloning into 'C:\Users\闈橽AppData\Local\Temp\wagon-git1012732376.checkout'...
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git checkout"
[INFO] [git] Your branch is up-to-date with 'origin/master'.
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git ls-files"
[INFO] [git] .gitignore
[INFO] [git] README.md
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git add ."
[INFO] [git] warning: LF will be replaced by CRLF in about/index.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in article/2014/01/hello-world/index.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in atom.xml.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in index.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [git] warning: LF will be replaced by CRLF in sample-page.html.
[INFO] [git] The file will have its original line endings in your working directory.
[INFO] [C:\Users\静\AppData\Local\Temp\wagon-git1012732376.checkout] Executing: cmd.exe /X /C "git commit --allow-empty -m "GitHubWagon: Deploying OpooPress to
GitHub Pages.""
[INFO] [git]
[INFO] [git] *** Please tell me who you are.
[INFO] [git]
[INFO] [git] Run
[INFO] [git]
[INFO] [git] git config --global user.email "you@example.com"
[INFO] [git] git config --global user.name "Your Name"
[INFO] [git]
[INFO] [git] to set your account's default identity.
[INFO] [git] Omit --global to set the identity only in this repository.
[INFO] [git]
[INFO] [git] fatal: unable to auto-detect email address (got '静@sconfield.(none)')
Transfer error: org.opoo.press.maven.wagon.git.GitException: Unable to commit files
git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnecting
git:https://gitcafe.com/sconfield/sconfield.git/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.255s
[INFO] Finished at: Wed Jan 29 11:29:32 CST 2014
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.opoo.press.maven.plugins:opoopress-maven-plugin:1.0.3:deploy (default-cli) on project my-opoopress-site: Error uploading site
: Unable to put file: Unable to commit files -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@opoo

This comment has been minimized.

Show comment
Hide comment
@opoo

opoo Jan 27, 2014

Owner

你是 Windows 操作系统吧?你打开的 cmd 窗口需要能够执行 git 命令,然后在这个窗口中执行 mvn op:deploy 试试。

经测试,在 Windows 下使用 GitHub for Windows 的 git shell 是可以正常发布到 github.io 的,我想应该也可以发布到 gitcafe。

Owner

opoo commented Jan 27, 2014

你是 Windows 操作系统吧?你打开的 cmd 窗口需要能够执行 git 命令,然后在这个窗口中执行 mvn op:deploy 试试。

经测试,在 Windows 下使用 GitHub for Windows 的 git shell 是可以正常发布到 github.io 的,我想应该也可以发布到 gitcafe。

@sconfield

This comment has been minimized.

Show comment
Hide comment
@sconfield

sconfield Jan 27, 2014

嗯,windows8.1,我用 git bash 执行的 mvn op:deploy ;我试试在 cmd 里执行。

嗯,windows8.1,我用 git bash 执行的 mvn op:deploy ;我试试在 cmd 里执行。

@opoo

This comment has been minimized.

Show comment
Hide comment
@opoo

opoo Jun 18, 2014

Owner

@sconfield 今天突然又看了一下你提交的最后一次错误信息,那是说你的 git 没有配置用户名和email 地址。

通过以下命令先设置 git 的参数,然后再发布应该可以。

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

这里使用你在 gitcafe 使用的用户名和 email 地址。

Owner

opoo commented Jun 18, 2014

@sconfield 今天突然又看了一下你提交的最后一次错误信息,那是说你的 git 没有配置用户名和email 地址。

通过以下命令先设置 git 的参数,然后再发布应该可以。

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

这里使用你在 gitcafe 使用的用户名和 email 地址。

@opoo

This comment has been minimized.

Show comment
Hide comment
@opoo

opoo Jul 30, 2014

Owner

@sconfield 由于通过git:https://协议发布时需要设置用户名、email等信息,而且需要输入密码,用户名、email可以通过全局方式设置(如上),但密码没有地方可以输入,所以这种方式比较容易失败。

如果在发布之前向该库提交过内容时,由于 git 缓存的缘故,偶尔也能正常发布。

根本的解决方式时使用 SSH 方式访问该库。

  • 生成 SSH 的 private keypublic key,然后将 public key 上传到 git 服务器。(参考: https://help.github.com/articles/generating-ssh-keys)
  • 然后在 OpooPress 的配置文件 config.yml 中指定 deploy_server 属性为 deploy_server: {id: "github", url: "git:ssh://git@gitserver/opt/gitrepos/pages.git", branch: "master"}

注意,对于 GitHub 和 GitCafe 那种不带SSH协议(实质上默认是SSH协议)的URL,我们需要这样配置:

  • deploy_server: {id: "github", url: "git:default://git@github.com:opoo/opoo.github.io.git", branch: "master"}
  • deploy_server: {id: "github", url: "git:default://git@gitcafe.com:opoo/opoo.git", branch: "gitcafe-pages"}

PS: 这个功能从1.1.2版本开始得以支持。

6c8426f

Owner

opoo commented Jul 30, 2014

@sconfield 由于通过git:https://协议发布时需要设置用户名、email等信息,而且需要输入密码,用户名、email可以通过全局方式设置(如上),但密码没有地方可以输入,所以这种方式比较容易失败。

如果在发布之前向该库提交过内容时,由于 git 缓存的缘故,偶尔也能正常发布。

根本的解决方式时使用 SSH 方式访问该库。

  • 生成 SSH 的 private keypublic key,然后将 public key 上传到 git 服务器。(参考: https://help.github.com/articles/generating-ssh-keys)
  • 然后在 OpooPress 的配置文件 config.yml 中指定 deploy_server 属性为 deploy_server: {id: "github", url: "git:ssh://git@gitserver/opt/gitrepos/pages.git", branch: "master"}

注意,对于 GitHub 和 GitCafe 那种不带SSH协议(实质上默认是SSH协议)的URL,我们需要这样配置:

  • deploy_server: {id: "github", url: "git:default://git@github.com:opoo/opoo.github.io.git", branch: "master"}
  • deploy_server: {id: "github", url: "git:default://git@gitcafe.com:opoo/opoo.git", branch: "gitcafe-pages"}

PS: 这个功能从1.1.2版本开始得以支持。

6c8426f

@opoo opoo closed this Jul 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment