# \[solved\]No such device or address, with a broken token

**URL:** <https://drone.discourse.group/t/solved-no-such-device-or-address-with-a-broken-token/11201>\
**Category:** Drone Support\
**Created:** [April 30, 2019, 9:59am UTC](https://drone.discourse.group/t/solved-no-such-device-or-address-with-a-broken-token/11201 "2019-04-30T09:59:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/luis/32/4291_2.png) [@Luis](https://drone.discourse.group/u/Luis)\
**Post date:** [April 30, 2019, 9:59am UTC](https://drone.discourse.group/t/solved-no-such-device-or-address-with-a-broken-token/11201/1 "2019-04-30T09:59:09Z")

</div>

After searching through discourse, still no luck =(

I am cloning a private repo from gitea, and got the error:

> fatal: could not read Username for ‘[https://gitea.hostname.com](https://gitea.hostname.com)’: No such device or address

My environment:

- Gitea 1.8
- Drone 1.1.0

Drone Env:

> DRONE\_KUBERNETES\_ENABLED: true  
> DRONE\_KUBERNETES\_NAMESPACE: drone  
> DRONE\_KUBERNETES\_SERVICE\_ACCOUNT: cnc-drone-pipeline  
> DRONE\_GIT\_ALWAYS\_AUTH: true  
> DRONE\_SERVER\_HOST: [drone.hostname.com](http://drone.hostname.com)  
> DRONE\_SERVER\_PROTO: https  
> DRONE\_USER\_CREATE: username:luis,machine:false,admin:true,token: Access\_Tokens\_Generate\_From\_Gitea  
> DRONE\_RPC\_SECRET: Secret: cnc-drone-rpc-secret  
> DRONE\_DATABASE\_DATASOURCE: user:password@tcp(host:3306)/drone?parseTime=true&charset=utf8mb4  
> DRONE\_DATABASE\_DRIVER: mysql  
> DRONE\_LOGS\_TRACE:  
> DRONE\_GITEA\_SERVER: [https://gitea.hostname.com](https://gitea.hostname.com)  
> DRONE\_GITEA\_CLIENT\_ID: Client\_ID\_Generate\_From\_Gitea  
> DRONE\_GITEA\_CLIENT\_SECRET: Client\_SECRET\_Generate\_From\_Gitea

Already tried:

1. checked repo is in private

> `+ drone repo info org/repo`  
> Owner: org  
> Repo: repo  
> Config: .drone.yml  
> Visibility: private  
> Private: true  
> Trusted: false  
> Protected: false  
> Remote: [https://gitea.hostname.com/org/repo.git](https://gitea.hostname.com/org/repo.git)

1. checked .netrc got the token, and when i paste it into [jwt.io](http://jwt.io) to see what’s in payload, there’s no useful info about the user. And it’s not able to clone, then i tried using [https://username:password@gitea.hostname.com](https://username:password@gitea.hostname.com), it worked.

```auto
clone:
  disable: true

steps:
  - name: clone
    image: docker:git
    commands:
      - echo $DRONE_REPO_PRIVATE
      - cat /root/.netrc
      - git clone https://token@gitea.hostname.com/org/repo.git

```

```auto
+ echo $DRONE_REPO_PRIVATE
2 true
3 + cat /root/.netrc
4 machine gitea.hostname.com
5 login eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjEsInR0IjowLCJleHAiOjE1NTY2MTkxOTMsImlhdCI6MTU1NjYxNTU5M30.jAMsdZ0xDapVHD7xs6a3Oridbmc4ZxQwc_98Y0SE4m8QpnKTW2ENy3zQ6jbXRsxbCL_NCKv6g7Eb8_Yon6ADyA
6 password x-oauth-basic
+ git clone https://eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjEsInR0IjowLCJleHAiOjE1NTY2MTg4MjUsImlhdCI6MTU1NjYxNTIyNX0.B_5NWxAmmr_GBGIsUDoVUBjlQiK3JRWNNi3PQ4ODH-ynVU1ah4jA5k7YMBZHMaMm4ovqwPqW2NRX4Wz58LONKQ@gitea.hostname.com/org/repo.git
Cloning into 'repo'...
fatal: could not read Password for 'https://eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjEsInR0IjowLCJleHAiOjE1NTY2MTg4MjUsImlhdCI6MTU1NjYxNTIyNX0.B_5NWxAmmr_GBGIsUDoVUBjlQiK3JRWNNi3PQ4ODH-ynVU1ah4jA5k7YMBZHMaMm4ovqwPqW2NRX4Wz58LONKQ@gitea.hostname.com': No such device or address

```

Does anyone facing the same issue, or solved it? Any help is appreciate!!

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/techknowlogick/32/4245_2.png) [@techknowlogick](https://drone.discourse.group/u/techknowlogick)\
**Post date:** [April 30, 2019, 1:38pm UTC](https://drone.discourse.group/t/solved-no-such-device-or-address-with-a-broken-token/11201/2 "2019-04-30T13:38:17Z")

</div>

Hi @Luis

Please see response here: [Gitea 1.8.0 and Drone 1.1.0 unable to clone repository (2FA)](http://discuss.harness.io/t/gitea-1-8-0-and-drone-1-1-0-unable-to-clone-repository-2fa/4428/7)

---

<div class="post-metadata">

**Author:** ![Luis](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/luis/32/4291_2.png) [@Luis](https://drone.discourse.group/u/Luis)\
**Post date:** [April 30, 2019, 3:52pm UTC](https://drone.discourse.group/t/solved-no-such-device-or-address-with-a-broken-token/11201/3 "2019-04-30T15:52:55Z")

</div>

I’ve tried, the problem solved, Thank you @techknowlogick!
