我目前正在建立自己的Maven倉庫。我正試圖增加對私有倉庫的支持。然而,我在這里配置了我的倉庫
pom.xml <repository>/span>
<id>kingtux-dev</id>/span>
<name>My Developer Repo</name>/span>
<url>http://127.0.0.1:6742/storages/public/maven</url>
</repository>
settings.xml
<settings xmlns="http://maven. apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"。
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"/span>>
<servers>/span>
<server>/span>
<id>kingtux-dev</id> /span>
<username>user</username>
<password>/span>password</password>/span>
</server>/span>
</servers>/span>
</settings>/span>
雖然我的軟體沒有檢測到任何形式的授權頭。
它發現的唯一頭檔案是
cache-control: no-cache
accept-encoding: gzip,deflate
cache-store: no-store
user-agent: Apache-Maven/3.6.3 (Java 11.0。 11; Linux 5. 11.0-7633-generic)
host: 127.0.0.1:6742
連接: Keep-Alive
pragma: nocache
uj5u.com熱心網友回復:
問題就像kmarbaise建議的那樣。
在認證失敗時回傳https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate,Maven將回傳將授權頭。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/310152.html
標籤:
