【问题标题】:Git-tf thowing permission denied over VPNGit-tf 通过 VPN 拒绝权限
【发布时间】:2012-10-12 14:11:53
【问题描述】:

我正在尝试在家中使用 VPN 访问我们的 TFS 服务器,但它只给我以下消息:

Connecting to TFS...
git-tf: Permission denied: connect

我使用的是完全限定的 URL,其他一切都可以在 VPN 上正常运行。我可以尝试任何身份验证配置设置吗?我在任何地方都找不到任何在线提及的内容。

当然,当我在办公室时,它工作得很好。

编辑 - 来自日志的堆栈跟踪

2012-10-12 10:07:31,231 INFO  [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for http://svrtfs2010.ms.innovativesol.com:8080/tfs/DefaultCollection, authenticating as innovative/jrusso
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Retrying request
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Retrying request
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Retrying request
2012-10-12 10:07:31,544 WARN  [main] (git-tf) Error executing command: pull --deep --rebase
com.microsoft.tfs.core.exceptions.TECoreException: Permission denied: connect
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
    at com.microsoft.tfs.core.exceptions.mappers.LocationExceptionMapper.map(LocationExceptionMapper.java:32)
    at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:76)
    at com.microsoft.tfs.core.clients.framework.location.LocationService.connect(LocationService.java:754)
    at com.microsoft.tfs.core.clients.framework.location.LocationService.ensureConnected(LocationService.java:884)
    at com.microsoft.tfs.core.clients.framework.location.LocationService.ensureAuthenticated(LocationService.java:923)
    at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:326)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlClient(Command.java:474)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlService(Command.java:492)
    at com.microsoft.gittf.client.clc.commands.PullCommand.run(PullCommand.java:140)
    at com.microsoft.gittf.client.clc.Main.main(Main.java:319)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.TransportException: Permission denied: connect
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:744)
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
    at ms.ws._LocationWebServiceSoap12Service.connect(_LocationWebServiceSoap12Service.java:384)
    at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:70)
    ... 10 more
Caused by: java.net.SocketException: Permission denied: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.microsoft.tfs.core.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:147)
    at com.microsoft.tfs.core.httpclient.HttpConnection.open(HttpConnection.java:862)
    at com.microsoft.tfs.core.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1690)
    at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:495)
    at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:197)
    at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:464)
    at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:376)
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:588)
    ... 13 more

【问题讨论】:

  • 这很奇怪。您的日志中有完整的堆栈跟踪吗?他们在%LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Logs
  • 希望对您有所帮助,我很想继续使用 git-tf。我只是在学习 Git,但与 TFS 相比,它确实改善了我的工作流程。
  • 让我猜猜 - JDK7 和 Cisco VPN?
  • 是的 :o/ 我不喜欢那样的声音
  • 我在使用 Spring STS、JDK 1.7 通过 Cisco VPN 连接到 TFS 时遇到了类似的问题。使用此线程中建议的选项 (-Djava.net.preferIPv4Stack=true),我能够解决我的问题

标签: tfs vpn git-tf


【解决方案1】:

这与Java bug 703177 有关。 Java 7 带来了 IPv6 支持,据报道 Cisco 的 VPN 客户端拒绝 IPv6 流量。您可以通过 java.net.preferIPv4Stack 系统属性强制 Java 使用 IPv4 作为其传输。

您需要编辑启动 JVM 的 git-tf 启动器脚本才能执行此操作。您可以在git-tfgit-tf.cmd 的启动行中添加-Djava.net.preferIPv4Stack=true 参数。

git-tf 的最后几行应该是:

exec java -Xmx512m -classpath "$GITTF_CLASSPATH" \
    "-Dcom.microsoft.tfs.jni.native.base-directory=$BASE_DIRECTORY/native" \
    -Djava.net.preferIPv4Stack=true \
    com.microsoft.gittf.client.clc.Main "$@"

git-tf.cmd 的第 47 行应该是:

java -ea -Xmx512M -cp %GITTF_CLASSPATH% "-Dcom.microsoft.tfs.jni.native.base-directory=%BASE_DIRECTORY%native" -Djava.net.preferIPv4Stack=true com.microsoft.gittf.client.clc.Main %*

【讨论】:

  • 太棒了!做到了!谢谢!
  • 很高兴听到这个消息——这让我有点紧张。 :)
猜你喜欢
  • 1970-01-01
  • 2016-10-30
  • 2020-07-30
  • 2011-12-15
  • 1970-01-01
  • 2013-08-08
  • 2017-12-02
  • 2018-04-15
  • 2017-05-23
相关资源
最近更新 更多