Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git &引用;致命:无法读取';https://XXX': 没有此类设备或地址”;用drone.io和Gogs_Git_Drone.io_Gogs - Fatal编程技术网

Git &引用;致命:无法读取';https://XXX': 没有此类设备或地址”;用drone.io和Gogs

Git &引用;致命:无法读取';https://XXX': 没有此类设备或地址”;用drone.io和Gogs,git,drone.io,gogs,Git,Drone.io,Gogs,我想使用和,以便在我的环境中具有一些CI功能 ()的文档不是最新的,为了发布它,我不得不进行大量的挖掘 我的docker compose.yml文件如下: version: '3' services: drone-server: image: drone/drone:latest network_mode: "bridge" volumes: - "/docker/drone:/var/lib/drone/" environment:

我想使用和,以便在我的环境中具有一些CI功能

()的文档不是最新的,为了发布它,我不得不进行大量的挖掘

我的
docker compose.yml
文件如下:

version: '3'

services:

  drone-server:
    image: drone/drone:latest
    network_mode: "bridge"
    volumes:
      - "/docker/drone:/var/lib/drone/"
    environment:
      - "DRONE_OPEN=true"
      - "DRONE_HOST=XXX"
      - "DRONE_SECRET=XXX"
      - "DRONE_GOGS=true"
      - "DRONE_GOGS_URL=http://gogs:3000"
      - "DRONE_GOGS_GIT_USERNAME=XXX"
      - "DRONE_GOGS_GIT_PASSWORD=XXX"
      - "DRONE_GOGS_PRIVATE_MODE=true"
    external_links:
      - "dedigogs_gogs_1:gogs"

  drone-agent:
    image: drone/agent:latest
    network_mode: "bridge"
    depends_on:
      - drone-server
    links:
      - drone-server
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
    environment:
      - "DRONE_SERVER=drone-server:9000"
      - "DRONE_HOST=XXX"
      - "DRONE_SECRET=XXX"
      - "DRONE_GOGS=true"
      - "DRONE_GOGS_URL=http://gogs:3000"
      - "DRONE_GOGS_GIT_USERNAME=XXX"
      - "DRONE_GOGS_GIT_PASSWORD=XXX"
      - "DRONE_GOGS_PRIVATE_MODE=true"
    external_links:
      - "dedigogs_gogs_1:gogs"
dedigogs\u gogs\u 1
是我的
gogs
docker实例)

我可以使用我的
gogs
凭据连接到
drone

我可以查看我所有的私有存储库,并为
drone.io
启用它们

但是,在构建提交时,代理(我认为)无法克隆存储库:

+ git init
Initialized empty Git repository in /drone/src/XXX/XXX/XXX/.git/
+ git remote add origin https://XXX/XXX/XXX.git
+ git fetch --no-tags origin +refs/heads/master:
fatal: could not read Username for 'https://XXX': No such device or address
exit status 128
我试着玩
.drone.yml
(添加了“
克隆
”部分,使用
用户名
网络用户名
,…),我还试着玩环境变量,什么都不起作用,我无法使
drone
对克隆存储库进行身份验证


有什么想法吗?

问题是,我在gogs上也遇到过类似的问题,出于某种原因,.netrc文件与用于克隆的url不匹配

请尝试使用浏览器中访问Gogs的完整url,而不是docker网络中的内部主机名

DRONE_GOGS_URL=http://myurl.to.gogs.com:3000
DRONE_GOGS_URL=http://some-ip-address:3000