我已经在Windows服务器上运行了Git,并且想从我的OSX笔记本电脑同步到它。似乎有两个可行的选择:
- SSH(这似乎是最好的黑客Windows) Smart HTTP
我选择了智能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:.scmconfigconfig.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
您应该从https://bitbucket.org/sdorra/scm-manager/wiki/download重新尝试使用最新版本的SCM-Manager。过去几个月有了很大的发展。检查您的配置并将日志级别增加到TRACE。也许你的windows服务器和mac客户端之间有编码问题。您还应该查看邮件列表http://groups.google.com/group/scmmanager,以直接从开发人员那里获得帮助。