# Cannot clone from gitea by drone cli while drone server can

**URL:** <https://drone.discourse.group/t/cannot-clone-from-gitea-by-drone-cli-while-drone-server-can/12001>\
**Category:** Drone Support\
**Created:** [May 11, 2022, 1:47am UTC](https://drone.discourse.group/t/cannot-clone-from-gitea-by-drone-cli-while-drone-server-can/12001 "2022-05-11T01:47:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stalkyr](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/stalkyr/32/7603_2.png) [@Stalkyr](https://drone.discourse.group/u/Stalkyr)\
**Post date:** [May 11, 2022, 1:47am UTC](https://drone.discourse.group/t/cannot-clone-from-gitea-by-drone-cli-while-drone-server-can/12001/1 "2022-05-11T01:47:57Z")

</div>

Hi there,

I managed to find out how to (custom) clone from gitea successfully, here is the log

```auto
latest: Pulling from alpine/git
Digest: sha256:f87181a6852c6edd1d1494b577813a3f9baec5972ad5f7a9dcbee1c5d4943403
Status: Image is up to date for alpine/git:latest
+ cat ~/.netrc
machine sstsu login <very long token> password x-oauth-basic
+ git clone --recurse-submodules http://sstsu:53000/proj/repo.git
Cloning into 'repo'...

```

Then I try to run the same .drone.yml offline by drone cli, it failed

```auto
$ drone exec --trusted --netrc-username "<same long token>" --netrc-password "x-oauth-basic" --netrc-machine "sstsu"

```

output

```auto
[clone:0] + cat ~/.netrc
[clone:1] machine sstsu
[clone:2] login <same long token>
[clone:3] password x-oauth-basic
[clone:4] + git clone --recurse-submodules http://sstsu:53000/proj/repo.git
[clone:5] Cloning into 'repo'...
[clone:6] fatal: could not read Username for 'http://sstsu:53000': No such device or address
2022/05/11 09:29:16 clone : exit code 128

```

And here is .drone.yml for reference

```auto
kind: pipeline
type: docker
name: dev_depoly

clone:
  disable: true

steps:
- name: clone
  image: alpine/git
  extra_hosts:
  - sstsu:172.22.27.134
  commands:
  - cat ~/.netrc
  - git clone --recurse-submodules http://sstsu:53000/proj/repo.git

```
