我在 Windows 服务器上运行了 Git,并希望从我的 OSX 笔记本电脑同步回它。对此似乎有两种可行的选择:
- SSH(对于 Windows 来说,这似乎是最好的 hackish)
- 智能 HTTP
我选择了 Smart HTTP 选项并设置了https://bitbucket.org/sdorra/scm-manager/wiki/Home。除了实际工作之外,这似乎勾选了我需要的所有框。
我可以轻松地克隆和拉取存储库,但不能推送。我已经尝试过使用端口转发等,但为了尽可能多地消除变量,我目前正在通过 VPN 进行测试。
..$ git clone http://user@192.168.12.201:8080/scm/git/foo
Cloning into 'foo'...
Password:
remote: Counting objects: 79, done
remote: Finding sources: 100% (79/79)
remote: Getting sizes: 100% (60/60)
remote: Compressing objects: 96% (58/60)
Unpacking objects: 100% (79/79), done.
remote: Total 79 (delta 0), reused 2 (delta 0)
..$ cd foo/
..$ touch blah
..$ git add blah
..$ git commit -m 'Testing this works'
[master 1c1637c] Testing this works
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 blah
..$ git push
Password:
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: [SCM]
remote: ! [rejected] refs/heads/master (unspecified reason)
并且该文件没有出现在远程存储库中。
有什么想法吗?有什么更好的方法可以用来远程同步?
编辑:
..$ git push -v
Pushing to http://user@192.168.12.201:8080/scm/git/foo
Password:
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: [SCM]
remote: ! [rejected] refs/heads/master (unspecified reason)
编辑 2 - 来自 SCM 的日志:
20:22:29.997 [Thread-0] INFO sonia.scm.boot.BootstrapListener - start scm-manager 1.24 in stage: PRODUCTION
20:22:30.001 [Thread-0] WARN sonia.scm.boot.BootstrapListener - fallback to default classloader
20:22:30.018 [Thread-0] INFO sonia.scm.plugin.DefaultPluginLoader - load core plugin /C:/Windows/Temp/jetty-0.0.0.0-8080-scm-webapp.war-_scm-any-/webapp/WEB-INF/lib/scm-git-plugin-1.24.jar
20:22:30.257 [Thread-0] INFO sonia.scm.plugin.DefaultPluginLoader - load core plugin /C:/Windows/Temp/jetty-0.0.0.0-8080-scm-webapp.war-_scm-any-/webapp/WEB-INF/lib/scm-hg-plugin-1.24.jar
20:22:30.261 [Thread-0] INFO sonia.scm.plugin.DefaultPluginLoader - load core plugin /C:/Windows/Temp/jetty-0.0.0.0-8080-scm-webapp.war-_scm-any-/webapp/WEB-INF/lib/scm-svn-plugin-1.24.jar
20:22:30.407 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - add GuiceModule sonia.scm.web.SvnServletModule
20:22:30.408 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - add GuiceModule sonia.scm.web.HgServletModule
20:22:30.408 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - add GuiceModule sonia.scm.web.GitServletModule
20:22:30.620 [Thread-0] INFO sonia.scm.util.ScmConfigurationUtil - load ScmConfiguration from file C:\.scm\config\config.xml
20:22:30.864 [Thread-0] INFO sonia.scm.event.ScmEventBus - use sonia.scm.event.GuavaScmEventBus as event bus implementation
20:22:30.890 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - bind RepositoryHandler sonia.scm.repository.HgRepositoryHandler
20:22:30.891 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - bind RepositoryServiceResolver sonia.scm.repository.spi.GitRepositoryServiceResolver
20:22:30.891 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - bind RepositoryServiceResolver sonia.scm.repository.spi.HgRepositoryServiceResolver
20:22:30.892 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - bind RepositoryHandler sonia.scm.repository.SvnRepositoryHandler
20:22:30.892 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - bind RepositoryHandler sonia.scm.repository.GitRepositoryHandler
20:22:30.892 [Thread-0] INFO sonia.scm.BindingExtensionProcessor - bind RepositoryServiceResolver sonia.scm.repository.spi.SvnRepositoryServiceResolver
20:22:30.927 [Thread-0] INFO sonia.scm.ScmServletModule - configure jersey with package path: sonia.scm
20:22:31.829 [Thread-0] INFO sonia.scm.repository.DefaultRepositoryManager - added RepositoryHandler class sonia.scm.repository.HgRepositoryHandler for type Type{name=hg, displayName=Mercurial}
20:22:31.838 [Thread-0] INFO sonia.scm.repository.DefaultRepositoryManager - added RepositoryHandler class sonia.scm.repository.SvnRepositoryHandler for type Type{name=svn, displayName=Subversion}
20:22:31.839 [Thread-0] INFO sonia.scm.repository.DefaultRepositoryManager - added RepositoryHandler class sonia.scm.repository.GitRepositoryHandler for type Type{name=git, displayName=Git}
20:22:31.844 [Thread-0] WARN sonia.scm.cache.EhCacheManager - could not find cache sonia.cache.authorizing, create new from defaults
20:22:31.893 [Thread-0] INFO sonia.scm.boot.BootstrapFilter - fallback to default classloader for GuiceFilter
20:22:37.701 [qtp1749190291-19] ERROR sonia.scm.web.GitReceiveHook - could not handle receive commands
sonia.scm.repository.RepositoryNotFoundException: null
at sonia.scm.repository.DefaultRepositoryManager.fireHookEvent(DefaultRepositoryManager.java:277) ~[classes/:na]
at sonia.scm.web.GitReceiveHook.handleReceiveCommands(GitReceiveHook.java:282) [scm-git-plugin-1.24.jar:na]
at sonia.scm.web.GitReceiveHook.onReceive(GitReceiveHook.java:338) [scm-git-plugin-1.24.jar:na]
at sonia.scm.web.GitReceiveHook.onPreReceive(GitReceiveHook.java:137) [scm-git-plugin-1.24.jar:na]
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:203) [org.eclipse.jgit-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:160) [org.eclipse.jgit-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.ReceivePackServlet.doPost(ReceivePackServlet.java:187) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [javax.servlet-2.5.0.v201103041518.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet-2.5.0.v201103041518.jar:na]
at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:237) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.ReceivePackServlet$Factory.doFilter(ReceivePackServlet.java:144) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:235) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.RepositoryFilter.doFilter(RepositoryFilter.java:151) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:235) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.NoCacheFilter.doFilter(NoCacheFilter.java:80) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:235) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.UrlPipeline.service(UrlPipeline.java:215) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.SuffixPipeline.service(SuffixPipeline.java:101) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.MetaFilter.doFilter(MetaFilter.java:175) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at org.eclipse.jgit.http.server.glue.MetaServlet.service(MetaServlet.java:133) [org.eclipse.jgit.http.server-2.1.0.201209190230-r.jar:2.1.0.201209190230-r]
at sonia.scm.web.ScmGitServlet.service(ScmGitServlet.java:134) [scm-git-plugin-1.24.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet-2.5.0.v201103041518.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at sonia.scm.web.filter.PermissionFilter.doFilter(PermissionFilter.java:170) [scm-core-1.24.jar:na]
at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.24.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at sonia.scm.web.filter.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:186) [scm-core-1.24.jar:na]
at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.24.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at sonia.scm.filter.BaseUrlFilter.doFilter(BaseUrlFilter.java:100) [classes/:na]
at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.24.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.1.jar:1.2.1]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.1.jar:1.2.1]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.1.jar:1.2.1]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.1.jar:1.2.1]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.1.jar:1.2.1]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.1.jar:1.2.1]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.1.jar:1.2.1]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
at sonia.scm.boot.BootstrapFilter.doFilter(BootstrapFilter.java:104) [classes/:na]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300) [jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445) [jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556) [jetty-security-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374) [jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.Server.handle(Server.java:363) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) [jetty-http-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [jetty-http-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [jetty-io-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-7.6.8.v20121106.jar:7.6.8.v20121106]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-7.6.8.v20121106.jar:7.6.8.v20121106]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_10]
20:22:37.707 [qtp1749190291-19] WARN sonia.scm.web.GitReceiveHook - abort git push request with msg: null
我注意到这一点有一个错误:
20:22:37.701 [qtp1749190291-19] ERROR sonia.scm.web.GitReceiveHook - could not handle receive commands