Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get this to publish from CircleCI? Failure on timeout for publishing crate (appears related to using SSH for git) #218

Closed
DarthHater opened this issue Jul 1, 2020 · 12 comments · Fixed by #719

Comments

@DarthHater
Copy link

Hi there!

This crate is really cool, and I'm stoked to get it working in my workflow.

That said, I'm getting an issue when trying to release using CircleCI:

https://app.circleci.com/pipelines/github/sonatype-nexus-community/cargo-pants/19/workflows/3d29f4b9-8907-421c-9a8f-67a70ffb5b70/jobs/20

    Updating crates.io index
 Downloading crates ...
  Downloaded cargo-release v0.13.4
  Installing cargo-release v0.13.4
 Downloading crates ...
  Downloaded dirs v2.0.2
  Downloaded dirs-sys v0.3.5
  Downloaded humantime v1.3.0
  Downloaded home v0.5.3
  Downloaded libssh2-sys v0.2.18
  Downloaded cfg-if v0.1.10
  Downloaded env_logger v0.7.1
  Downloaded difference v2.0.0
  Downloaded combine v3.8.1
  Downloaded jobserver v0.1.21
  Downloaded glob v0.3.0
  Downloaded aho-corasick v0.7.13
  Downloaded miniz_oxide v0.3.7
  Downloaded rustc-demangle v0.1.16
  Downloaded fnv v1.0.7
  Downloaded syn-mid v0.5.0
  Downloaded walkdir v2.3.1
  Downloaded version_check v0.9.2
  Downloaded linked-hash-map v0.5.3
  Downloaded adler32 v1.1.0
  Downloaded quick-error v1.2.3
  Downloaded unicode-width v0.1.8
  Downloaded thread_local v1.0.1
  Downloaded quote v1.0.7
  Downloaded itoa v0.4.6
  Downloaded lazy_static v1.4.0
  Downloaded pkg-config v0.3.17
  Downloaded proc-macro2 v1.0.18
  Downloaded num-traits v0.2.12
  Downloaded unreachable v1.0.0
  Downloaded termcolor v1.1.0
  Downloaded structopt v0.3.15
  Downloaded ryu v1.0.5
  Downloaded percent-encoding v2.1.0
  Downloaded textwrap v0.11.0
  Downloaded serde v1.0.114
  Downloaded unicode-xid v0.2.1
  Downloaded memchr v2.3.3
  Downloaded serde_json v1.0.56
  Downloaded serde_derive v1.0.114
  Downloaded same-file v1.0.6
  Downloaded once_cell v1.4.0
  Downloaded vec_map v0.8.2
  Downloaded unicode-bidi v0.3.4
  Downloaded toml v0.5.6
  Downloaded unicode-segmentation v1.6.0
  Downloaded unicode-normalization v0.1.13
  Downloaded regex-automata v0.1.9
  Downloaded matches v0.1.8
  Downloaded url v2.1.1
  Downloaded maplit v1.0.2
  Downloaded strsim v0.8.0
  Downloaded clap v2.33.1
  Downloaded syn v1.0.33
  Downloaded regex v1.3.9
  Downloaded openssl-probe v0.1.2
  Downloaded object v0.20.0
  Downloaded idna v0.2.0
  Downloaded regex-syntax v0.6.18
  Downloaded git2 v0.11.0
  Downloaded log v0.4.8
  Downloaded libgit2-sys v0.10.0
  Downloaded libc v0.2.71
  Downloaded libz-sys v1.0.25
  Downloaded gimli v0.21.0
  Downloaded cc v1.0.56
  Downloaded bitflags v1.2.1
  Downloaded semver-parser v0.9.0
  Downloaded semver-parser v0.7.0
  Downloaded globset v0.4.5
  Downloaded proc-macro-error v1.0.3
  Downloaded ignore v0.4.16
  Downloaded crossbeam-utils v0.7.2
  Downloaded byteorder v1.3.4
  Downloaded atty v0.2.14
  Downloaded time v0.1.43
  Downloaded void v1.0.2
  Downloaded toml_edit v0.1.5
  Downloaded tinyvec v0.3.3
  Downloaded structopt-derive v0.4.8
  Downloaded semver v0.9.0
  Downloaded proc-macro-error-attr v1.0.3
  Downloaded openssl-sys v0.9.58
  Downloaded num-integer v0.1.43
  Downloaded heck v0.3.1
  Downloaded error-chain v0.12.2
  Downloaded autocfg v1.0.0
  Downloaded either v1.5.3
  Downloaded ansi_term v0.11.0
  Downloaded chrono v0.4.11
  Downloaded cargo_metadata v0.9.1
  Downloaded bstr v0.2.13
  Downloaded boolinator v2.4.0
  Downloaded backtrace v0.3.49
  Downloaded ascii v0.9.3
  Downloaded addr2line v0.12.2
  Downloaded doc-comment v0.3.3
  Downloaded crates-index v0.13.4
  Downloaded clap-cargo v0.3.1
   Compiling libc v0.2.71
   Compiling autocfg v1.0.0
   Compiling proc-macro2 v1.0.18
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.33
   Compiling pkg-config v0.3.17
   Compiling version_check v0.9.2
   Compiling cfg-if v0.1.10
   Compiling memchr v2.3.3
   Compiling lazy_static v1.4.0
   Compiling serde_derive v1.0.114
   Compiling byteorder v1.3.4
   Compiling serde v1.0.114
   Compiling bitflags v1.2.1
   Compiling log v0.4.8
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.56
   Compiling matches v0.1.8
   Compiling tinyvec v0.3.3
   Compiling gimli v0.21.0
   Compiling adler32 v1.1.0
   Compiling unicode-width v0.1.8
   Compiling unicode-segmentation v1.6.0
   Compiling regex-syntax v0.6.18
   Compiling itoa v0.4.6
   Compiling doc-comment v0.3.3
   Compiling semver-parser v0.7.0
   Compiling rustc-demangle v0.1.16
   Compiling vec_map v0.8.2
   Compiling ansi_term v0.11.0
   Compiling percent-encoding v2.1.0
   Compiling strsim v0.8.0
   Compiling object v0.20.0
   Compiling void v1.0.2
   Compiling either v1.5.3
   Compiling quick-error v1.2.3
   Compiling fnv v1.0.7
   Compiling openssl-probe v0.1.2
   Compiling ascii v0.9.3
   Compiling same-file v1.0.6
   Compiling home v0.5.3
   Compiling linked-hash-map v0.5.3
   Compiling termcolor v1.1.0
   Compiling glob v0.3.0
   Compiling once_cell v1.4.0
   Compiling boolinator v2.4.0
   Compiling semver-parser v0.9.0
   Compiling difference v2.0.0
   Compiling maplit v1.0.2
   Compiling unreachable v1.0.0
   Compiling textwrap v0.11.0
   Compiling thread_local v1.0.1
   Compiling unicode-bidi v0.3.4
   Compiling miniz_oxide v0.3.7
   Compiling humantime v1.3.0
   Compiling walkdir v2.3.1
   Compiling unicode-normalization v0.1.13
   Compiling heck v0.3.1
   Compiling aho-corasick v0.7.13
   Compiling idna v0.2.0
   Compiling quote v1.0.7
   Compiling proc-macro-error-attr v1.0.3
   Compiling proc-macro-error v1.0.3
   Compiling error-chain v0.12.2
   Compiling num-traits v0.2.12
   Compiling num-integer v0.1.43
   Compiling crossbeam-utils v0.7.2
   Compiling jobserver v0.1.21
   Compiling atty v0.2.14
   Compiling time v0.1.43
   Compiling dirs-sys v0.3.5
   Compiling clap v2.33.1
   Compiling dirs v2.0.2
   Compiling cc v1.0.56
   Compiling regex-automata v0.1.9
   Compiling combine v3.8.1
   Compiling url v2.1.1
   Compiling bstr v0.2.13
   Compiling regex v1.3.9
   Compiling addr2line v0.12.2
   Compiling globset v0.4.5
   Compiling env_logger v0.7.1
   Compiling chrono v0.4.11
   Compiling backtrace v0.3.49
   Compiling ignore v0.4.16
   Compiling syn-mid v0.5.0
   Compiling openssl-sys v0.9.58
   Compiling libz-sys v1.0.25
   Compiling libssh2-sys v0.2.18
   Compiling libgit2-sys v0.10.0
   Compiling toml_edit v0.1.5
   Compiling structopt-derive v0.4.8
   Compiling git2 v0.11.0
   Compiling structopt v0.3.15
   Compiling semver v0.9.0
   Compiling toml v0.5.6
   Compiling cargo_metadata v0.9.1
   Compiling crates-index v0.13.4
   Compiling clap-cargo v0.3.1
   Compiling cargo-release v0.13.4
    Finished release [optimized] target(s) in 1m 53s
  Installing /usr/local/cargo/bin/cargo-release
   Installed package `cargo-release v0.13.4` (executable `cargo-release`)
[2020-07-01T03:47:33Z INFO ] Update cargo-pants to version 0.1.2
[master addee90] [skip ci] release {{ version }}
 2 files changed, 2 insertions(+), 2 deletions(-)
[2020-07-01T03:47:33Z INFO ] Running cargo publish on cargo-pants
    Updating crates.io index
   Packaging cargo-pants v0.1.2 (/home/circleci/project)
   Verifying cargo-pants v0.1.2 (/home/circleci/project)
   Compiling libc v0.2.71
   Compiling cfg-if v0.1.10
   Compiling autocfg v1.0.0
   Compiling proc-macro2 v1.0.18
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.33
   Compiling serde_derive v1.0.114
   Compiling lazy_static v1.4.0
   Compiling serde v1.0.114
   Compiling byteorder v1.3.4
   Compiling log v0.4.8
   Compiling futures v0.1.29
   Compiling maybe-uninit v2.0.0
   Compiling semver-parser v0.7.0
   Compiling either v1.5.3
   Compiling slab v0.4.2
   Compiling scopeguard v1.1.0
   Compiling fnv v1.0.7
   Compiling rand_core v0.4.2
   Compiling version_check v0.9.2
   Compiling autocfg v0.1.7
   Compiling matches v0.1.8
   Compiling tinyvec v0.3.3
   Compiling itoa v0.4.6
   Compiling memchr v2.3.3
   Compiling pkg-config v0.3.17
   Compiling cc v1.0.56
   Compiling bitflags v1.2.1
   Compiling ryu v1.0.5
   Compiling httparse v1.3.4
   Compiling regex-syntax v0.6.18
   Compiling gimli v0.21.0
   Compiling foreign-types-shared v0.1.1
   Compiling percent-encoding v1.0.1
   Compiling failure_derive v0.1.8
   Compiling serde_json v1.0.56
   Compiling openssl v0.10.30
   Compiling adler32 v1.1.0
   Compiling native-tls v0.2.4
   Compiling try-lock v0.2.2
   Compiling rustc-demangle v0.1.16
   Compiling percent-encoding v2.1.0
   Compiling crc32fast v1.2.0
   Compiling object v0.20.0
   Compiling adler v0.2.2
   Compiling encoding_rs v0.8.23
   Compiling openssl-probe v0.1.2
   Compiling unicode-width v0.1.8
   Compiling rustc-serialize v0.3.24
   Compiling mime v0.3.16
   Compiling dtoa v0.4.6
   Compiling quick-error v1.2.3
   Compiling lazy_static v0.2.11
   Compiling strsim v0.8.0
   Compiling scoped-tls v0.1.2
   Compiling vec_map v0.8.2
   Compiling encode_unicode v0.3.6
   Compiling termcolor v1.1.0
   Compiling ansi_term v0.11.0
   Compiling term v0.4.6
   Compiling difference v2.0.0
   Compiling platforms v0.1.4
   Compiling try_from v0.3.2
   Compiling lock_api v0.3.4
   Compiling thread_local v1.0.1
   Compiling foreign-types v0.3.2
   Compiling unicode-bidi v0.3.4
   Compiling miniz_oxide v0.3.7
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling unicode-normalization v0.1.13
   Compiling textwrap v0.11.0
   Compiling miniz_oxide v0.4.0
   Compiling humantime v1.3.0
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling crossbeam-epoch v0.8.2
   Compiling indexmap v1.4.0
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling unicase v2.6.0
   Compiling error-chain v0.12.2
   Compiling smallvec v0.6.13
   Compiling aho-corasick v0.7.13
   Compiling quote v1.0.7
   Compiling tokio-sync v0.1.8
   Compiling want v0.2.0
   Compiling idna v0.1.5
   Compiling idna v0.2.0
   Compiling base64 v0.10.1
   Compiling iovec v0.1.4
   Compiling num_cpus v1.13.0
   Compiling net2 v0.2.34
   Compiling time v0.1.43
   Compiling atty v0.2.14
   Compiling rand_os v0.1.3
   Compiling memchr v1.0.2
   Compiling rand v0.5.6
   Compiling dirs v1.0.5
   Compiling flate2 v1.0.16
   Compiling bytes v0.4.12
   Compiling futures-cpupool v0.1.8
   Compiling openssl-sys v0.9.58
   Compiling colored v1.9.3
   Compiling clap v2.33.1
   Compiling url v1.7.2
   Compiling term v0.5.2
   Compiling url v2.1.1
   Compiling mio v0.6.22
   Compiling tokio-executor v0.1.10
   Compiling crossbeam-queue v0.2.3
   Compiling regex v1.3.9
   Compiling tokio-io v0.1.13
   Compiling http v0.1.21
   Compiling string v0.2.1
   Compiling tokio-buf v0.1.1
   Compiling csv v0.15.0
   Compiling tokio-timer v0.2.13
   Compiling tokio-current-thread v0.1.7
   Compiling mime_guess v2.0.3
   Compiling crossbeam-deque v0.7.3
   Compiling addr2line v0.12.2
   Compiling cookie v0.12.0
   Compiling mio-uds v0.6.8
   Compiling tokio-codec v0.1.2
   Compiling prettytable-rs v0.6.7
   Compiling tokio-threadpool v0.1.18
   Compiling uuid v0.7.4
   Compiling backtrace v0.3.49
   Compiling publicsuffix v1.5.4
   Compiling env_logger v0.6.2
   Compiling tokio-fs v0.1.7
   Compiling http-body v0.1.0
   Compiling h2 v0.1.26
   Compiling synstructure v0.12.4
   Compiling failure v0.1.8
   Compiling semver v0.9.0
   Compiling serde_urlencoded v0.5.5
   Compiling toml v0.4.10
   Compiling rustc_version v0.2.3
   Compiling parking_lot_core v0.6.2
   Compiling parking_lot v0.9.0
   Compiling hyper v0.12.35
   Compiling cookie_store v0.7.0
   Compiling mockito v0.15.1
   Compiling tokio-reactor v0.1.12
   Compiling tokio-uds v0.2.6
   Compiling tokio-tcp v0.1.4
   Compiling tokio-udp v0.1.6
   Compiling tokio v0.1.22
   Compiling tokio-core v0.1.17
   Compiling hyper-tls v0.3.2
   Compiling reqwest v0.9.24
   Compiling cargo-pants v0.1.2 (/home/circleci/project/target/package/cargo-pants-0.1.2)
    Finished dev [unoptimized + debuginfo] target(s) in 45.11s
   Uploading cargo-pants v0.1.2 (/home/circleci/project)
[2020-07-01T03:48:19Z INFO ] Waiting for publish to complete...
[2020-07-01T03:53:20Z WARN ] Fatal: Timeout waiting for crate to be published.

Exited with code exit status 128

The publish to crates.io was successful, but it just sat there and timed out eventually.

I tried it a few different ways with CircleCI config to see if that was the issue (I was initially executing the commands in a bash script, moved them explicitly into CircleCI config), and no luck so far. Newest build with an issue is here: https://app.circleci.com/pipelines/github/sonatype-nexus-community/cargo-pants/22/workflows/6426e187-fd20-467f-abaf-97398330f2e1/jobs/28

Appreciate any help here, as I've hit the spot where I'm beating my head against the keyboard.

Let me know if you need any more information from me!

@epage
Copy link
Collaborator

epage commented Jul 1, 2020

That is very odd that it failed after a 5 minute timeout.

Maybe try with debug logging on (add a -v) so we can see if that provides any helpful context.

@DarthHater
Copy link
Author

[2020-07-01T18:41:18Z DEBUG] Cannot detect changes for cargo-pants because tag v0.1.5-alpha-0 is missing. Try setting `--prev-tag-name <TAG>`.
[2020-07-01T18:41:18Z INFO ] Update cargo-pants to version 0.1.5
[master d0aeaac] [skip ci] release 0.1.5
 2 files changed, 2 insertions(+), 2 deletions(-)
[2020-07-01T18:41:18Z INFO ] Running cargo publish on cargo-pants
    Updating crates.io index
   Packaging cargo-pants v0.1.5 (/home/circleci/project)
   Verifying cargo-pants v0.1.5 (/home/circleci/project)
   Compiling libc v0.2.71
   Compiling cfg-if v0.1.10
   Compiling autocfg v1.0.0
   Compiling proc-macro2 v1.0.18
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.33
   Compiling serde_derive v1.0.114
   Compiling lazy_static v1.4.0
   Compiling serde v1.0.114
   Compiling byteorder v1.3.4
   Compiling log v0.4.8
   Compiling futures v0.1.29
   Compiling semver-parser v0.7.0
   Compiling maybe-uninit v2.0.0
   Compiling either v1.5.3
   Compiling slab v0.4.2
   Compiling scopeguard v1.1.0
   Compiling rand_core v0.4.2
   Compiling fnv v1.0.7
   Compiling version_check v0.9.2
   Compiling autocfg v0.1.7
   Compiling tinyvec v0.3.3
   Compiling itoa v0.4.6
   Compiling matches v0.1.8
   Compiling pkg-config v0.3.17
   Compiling cc v1.0.56
   Compiling memchr v2.3.3
   Compiling bitflags v1.2.1
   Compiling regex-syntax v0.6.18
   Compiling httparse v1.3.4
   Compiling ryu v1.0.5
   Compiling gimli v0.21.0
   Compiling foreign-types-shared v0.1.1
   Compiling failure_derive v0.1.8
   Compiling percent-encoding v1.0.1
   Compiling adler32 v1.1.0
   Compiling serde_json v1.0.56
   Compiling openssl v0.10.30
   Compiling crc32fast v1.2.0
   Compiling native-tls v0.2.4
   Compiling percent-encoding v2.1.0
   Compiling object v0.20.0
   Compiling rustc-demangle v0.1.16
   Compiling try-lock v0.2.2
   Compiling adler v0.2.2
   Compiling openssl-probe v0.1.2
   Compiling unicode-width v0.1.8
   Compiling encoding_rs v0.8.23
   Compiling mime v0.3.16
   Compiling rustc-serialize v0.3.24
   Compiling quick-error v1.2.3
   Compiling dtoa v0.4.6
   Compiling vec_map v0.8.2
   Compiling encode_unicode v0.3.6
   Compiling term v0.4.6
   Compiling termcolor v1.1.0
   Compiling difference v2.0.0
   Compiling lazy_static v0.2.11
   Compiling ansi_term v0.11.0
   Compiling strsim v0.8.0
   Compiling scoped-tls v0.1.2
   Compiling platforms v0.1.4
   Compiling try_from v0.3.2
   Compiling thread_local v1.0.1
   Compiling lock_api v0.3.4
   Compiling foreign-types v0.3.2
   Compiling unicode-bidi v0.3.4
   Compiling miniz_oxide v0.4.0
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling miniz_oxide v0.3.7
   Compiling unicode-normalization v0.1.13
   Compiling textwrap v0.11.0
   Compiling humantime v1.3.0
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling crossbeam-epoch v0.8.2
   Compiling indexmap v1.4.0
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_xorshift v0.1.1
   Compiling unicase v2.6.0
   Compiling error-chain v0.12.2
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling smallvec v0.6.13
   Compiling quote v1.0.7
   Compiling iovec v0.1.4
   Compiling num_cpus v1.13.0
   Compiling net2 v0.2.34
   Compiling time v0.1.43
   Compiling atty v0.2.14
   Compiling rand_os v0.1.3
   Compiling memchr v1.0.2
   Compiling dirs v1.0.5
   Compiling rand v0.5.6
   Compiling flate2 v1.0.16
   Compiling base64 v0.10.1
   Compiling aho-corasick v0.7.13
   Compiling tokio-sync v0.1.8
   Compiling want v0.2.0
   Compiling bytes v0.4.12
   Compiling idna v0.1.5
   Compiling idna v0.2.0
   Compiling futures-cpupool v0.1.8
   Compiling colored v1.9.3
   Compiling clap v2.33.1
   Compiling term v0.5.2
   Compiling mio v0.6.22
   Compiling openssl-sys v0.9.58
   Compiling mime_guess v2.0.3
   Compiling tokio-io v0.1.13
   Compiling http v0.1.21
   Compiling string v0.2.1
   Compiling tokio-buf v0.1.1
   Compiling tokio-executor v0.1.10
   Compiling crossbeam-queue v0.2.3
   Compiling url v1.7.2
   Compiling csv v0.15.0
   Compiling url v2.1.1
   Compiling tokio-timer v0.2.13
   Compiling tokio-current-thread v0.1.7
   Compiling crossbeam-deque v0.7.3
   Compiling regex v1.3.9
   Compiling tokio-codec v0.1.2
   Compiling mio-uds v0.6.8
   Compiling prettytable-rs v0.6.7
   Compiling tokio-threadpool v0.1.18
   Compiling addr2line v0.12.2
   Compiling cookie v0.12.0
   Compiling uuid v0.7.4
   Compiling tokio-fs v0.1.7
   Compiling backtrace v0.3.49
   Compiling publicsuffix v1.5.4
   Compiling env_logger v0.6.2
   Compiling h2 v0.1.26
   Compiling http-body v0.1.0
   Compiling synstructure v0.12.4
   Compiling failure v0.1.8
   Compiling semver v0.9.0
   Compiling serde_urlencoded v0.5.5
   Compiling toml v0.4.10
   Compiling rustc_version v0.2.3
   Compiling parking_lot_core v0.6.2
   Compiling parking_lot v0.9.0
   Compiling hyper v0.12.35
   Compiling tokio-reactor v0.1.12
   Compiling cookie_store v0.7.0
   Compiling mockito v0.15.1
   Compiling tokio-tcp v0.1.4
   Compiling tokio-udp v0.1.6
   Compiling tokio-uds v0.2.6
   Compiling tokio v0.1.22
   Compiling tokio-core v0.1.17
   Compiling hyper-tls v0.3.2
   Compiling reqwest v0.9.24
   Compiling cargo-pants v0.1.5 (/home/circleci/project/target/package/cargo-pants-0.1.5)
    Finished dev [unoptimized + debuginfo] target(s) in 48.06s
   Uploading cargo-pants v0.1.5 (/home/circleci/project)
[2020-07-01T18:42:07Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:07Z INFO ] Waiting for publish to complete...
[2020-07-01T18:42:08Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:09Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:10Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:11Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:12Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:13Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:14Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:15Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:17Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:18Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:19Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:20Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:21Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:22Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:23Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:24Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:25Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:26Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:27Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:28Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:29Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:30Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:31Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:32Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:33Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:34Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:36Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:37Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:38Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:39Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:40Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:41Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:42Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:43Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:44Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:45Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:46Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:47Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)
[2020-07-01T18:42:48Z DEBUG] Crate index update failed with authentication required but no callback set; class=Ssh (23)

Looks like it's failing on that! Any ideas? I have an environment variable of: CARGO_REGISTRY_TOKEN=**REDACTED** set for the cargo publish bit, am I missing anything?

@DarthHater
Copy link
Author

Something I can think of after Googling that error message is we use an ssh key for a machine user to publish to git for a lot of our projects, and maybe that's causing it?

@epage
Copy link
Collaborator

epage commented Jul 1, 2020

The publish to crates.io was successful, but it just sat there and timed out eventually.

Looks like it's failing on that!

Just wanted to double check on the original statement in case the error message is misleading us.

Overall, I'm unsure what to say about this.

@DarthHater
Copy link
Author

To clarify, this library seems to push to crates.io successfully, but then sits and times out after it does. This: Crate index update failed with authentication required but no callback set seems to be what it is running over and over before it times out.

@DarthHater
Copy link
Author

I have an inkling of an idea of what might cause this, the token I'm using for crates.io is for my personal user, and the git creds we are using in CircleCI are for a machine user. Gonna try and create a crates.io account for the machine user and see if using that token changes things?

@DarthHater
Copy link
Author

Ok even with creating a crates.io account for the machine user, and then giving them ownership of the crate, still no worky. The issue seems to be somewhere in:

https://github.com/sunng87/cargo-release/blob/master/src/cargo.rs#L70-L95

Specifically, in calling this:

https://docs.rs/crates-index/0.15.0/src/crates_index/lib.rs.html#284-294

I'm a bit lost beyond that, but that's where stuff is dying.

@DarthHater
Copy link
Author

Ok, some good news: this fails for me locally, as well as on CircleCI (so I doubt it's anything with CircleCI).

Stuff I've tried:

  • Setting git config --global url."git@github.com:".insteadOf "https://github.com/" (no effect thus far)
  • CARGO_NET_GIT_FETCH_WITH_CLI=true cargo release -v (this should use git cli rather than libgit2, but I'm not seeing any effect from doing so
  • Creating a .cargo/config file with:
[net]
git-fetch-with-cli = true

Similar to the above try, didn't do anything.

I did some digging in the crate repository logs (/Users/darthhater/.cargo/registry/index/github.com-1ecc6299db9ec823/.git/logs/refs/remotes/origin) and I see:

00a392d1f68aca79d2ddcd97a11d373eeeb33ea4 6e6a2f376b8405930ab9937111b79a0b820af13e J H <5544326+DarthHater@users.noreply.github.com> 1593637235 -0800 fetch ssh://git@github.com/rust-lang/crates.io-index
67a07adef26c9bedce888fcfabf61f61b9b21fdc d0a15ec8076b8382106acdcf1bbab3d38974cf55 J H <5544326+DarthHater@users.noreply.github.com> 1593638807 -0800 fetch --force --update-head-ok https://github.com/rust-lang/crates.io-index refs/heads/master:refs/remotes/origin/master: fast-forward

So something has changed, and it appears to be trying to use https at this point, prior it was attempting ssh. I'm not sure WHY it is doing that (because I've basically said not to in my global git config, but who even knows).

@DarthHater
Copy link
Author

In some more logical digging, I don't think that I can use the git-fetch-with-cli to change how cargo is doing things because you are using the crates_index::Index stuff, which is using libgit2 directly.

I sort of imagine the issue is with the: https://github.com/frewsxcv/rust-crates-index library, in either how they call the libgit2 stuff, or something akin.

I think this would be easyish to recreate if you use ssh instead of https for working with git.

@DarthHater
Copy link
Author

I filed an issue on the rust-crates-index project, as it seems like that is where the real issue is at, that said, it might be good to use another library or something akin to do the crates.io index update, etc... as that lib is calling git2 directly, and could cause issues for others sorta like what I just ran into.

@DarthHater DarthHater changed the title How can I get this to publish from CircleCI? Failure on timeout for publishing crate How can I get this to publish from CircleCI? Failure on timeout for publishing crate (appears related to using SSH for git) Jul 2, 2020
@let4be
Copy link

let4be commented Jun 2, 2021

Any update on this? having exactly the same issue, not a deal breaker but a bit annoying

@epage
Copy link
Collaborator

epage commented Jun 3, 2021

Random thoughts

  • Push for cargo publish to have a wait option and conditionally use that
  • Allow changing the timeout time and allow disabling the actual wait logic, so people can disable it all if they are single-crate or switch to timeout only
  • Only wait between crates and don't wait after the last crate (ie auto-detect when we can avoid this for single crates)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants