Skip to content

gitoxide auth tests sporadically failing #11821

Closed
@ehuss

Description

@ehuss

Some of the gitoxide tests seem to be randomly failing in CI:

The errors look like:

---- git_auth::http_auth_offered stdout ----
running `/Users/runner/work/cargo/cargo/target/debug/cargo build -v`
running `/Users/runner/work/cargo/cargo/target/debug/cargo check`
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `{}`,
 right: `{"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1", "Authorization: Basic Zm9vOmJhcg==", "Accept: */*"}`', tests/testsuite/git_auth.rs:63:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'git_auth::http_auth_offered' panicked at '
test failed running `/Users/runner/work/cargo/cargo/target/debug/cargo check`
error: expected to find:
    Updating git repository `http://127.0.0.1:50629/foo/bar`
error: failed to get `bar` as a dependency of package `foo v0.0.1 [..]`

Caused by:
  failed to load source for dependency `bar`

Caused by:
  Unable to update http://127.0.0.1:50629/foo/bar

Caused by:
  failed to clone into: [..]

Caused by:
  failed to authenticate when downloading repository

  * attempted to find username/password via `credential.helper`, but [..]

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://[..]

Caused by:


did not find in output:
    Updating git repository `http://127.0.0.1:50629/foo/bar`
error: failed to get `bar` as a dependency of package `foo v0.0.1 (/Users/runner/work/cargo/cargo/target/tmp/cit/testsuite/git_auth/http_auth_offered/foo)`

Caused by:
  failed to load source for dependency `bar`

Caused by:
  Unable to update http://127.0.0.1:50629/foo/bar

Caused by:
  failed to clone into: /Users/runner/work/cargo/cargo/target/tmp/cit/testsuite/git_auth/http_auth_offered/home/.cargo/git/db/bar-71575e16952ccc70

Caused by:
  failed to authenticate when downloading repository

  * attempted to find username/password via git's `credential.helper` support, but failed

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  Failed to obtain credentials

Caused by:
  An IO error occurred while communicating to the credentials helper

Caused by:
  Broken pipe (os error 32)
', tests/testsuite/git_auth.rs:163:10

---- git_auth::instead_of_url_printed stdout ----
running `/Users/runner/work/cargo/cargo/target/debug/cargo build -v`
running `/Users/runner/work/cargo/cargo/target/debug/cargo check`
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `{}`,
 right: `{"Authorization: Basic Zm9vOmJhcg==", "Accept: */*", "GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1"}`', tests/testsuite/git_auth.rs:63:9
thread 'git_auth::instead_of_url_printed' panicked at '
test failed running `/Users/runner/work/cargo/cargo/target/debug/cargo check`
error: stderr did not match:
1   1         Updating git repository `https://foo.bar/foo/bar`
2   2     error: failed to get `bar` as a dependency of package `foo [..]`
3   3     
4   4     Caused by:
5   5       failed to load source for dependency `bar`
6   6     
7   7     Caused by:
8   8       Unable to update https://foo.bar/foo/bar
9   9     
10  10    Caused by:
11  11      failed to clone into: [..]
12  12    
13  13    Caused by:
14  14      failed to authenticate when downloading repository: http://127.0.0.1:50632/foo/bar
15  15    
16       -  * attempted to find username/password via `credential.helper`, but maybe the found credentials were incorrect
    16   +  * attempted to find username/password via git's `credential.helper` support, but failed
17  17    
18  18      if the git CLI succeeds then `net.git-fetch-with-cli` may help here
19  19      https://[..]
20  20    
21  21    Caused by:
22  22      [..]
23  23    
24  24    Caused by:
25  25      [..]
    26   +
    27   +Caused by:
    28   +  Broken pipe (os error 32)


---- git_auth::instead_of_url_printed stdout ----
running `/home/runner/work/cargo/cargo/target/debug/cargo build -v`
running `/home/runner/work/cargo/cargo/target/debug/cargo check`
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `{}`,
 right: `{"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1", "Authorization: Basic Zm9vOmJhcg==", "Accept: */*"}`', tests/testsuite/git_auth.rs:63:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'git_auth::instead_of_url_printed' panicked at '
test failed running `/home/runner/work/cargo/cargo/target/debug/cargo check`
error: stderr did not match:
1   1         Updating git repository `https://foo.bar/foo/bar`
2   2     error: failed to get `bar` as a dependency of package `foo [..]`
3   3     
4   4     Caused by:
5   5       failed to load source for dependency `bar`
6   6     
7   7     Caused by:
8   8       Unable to update https://foo.bar/foo/bar
9   9     
10  10    Caused by:
11  11      failed to clone into: [..]
12  12    
13  13    Caused by:
14  14      failed to authenticate when downloading repository: http://127.0.0.1:43505/foo/bar
15  15    
16       -  * attempted to find username/password via `credential.helper`, but maybe the found credentials were incorrect
    16   +  * attempted to find username/password via git's `credential.helper` support, but failed
17  17    
18  18      if the git CLI succeeds then `net.git-fetch-with-cli` may help here
19  19      https://[..]
20  20    
21  21    Caused by:
22  22      [..]
23  23    
24  24    Caused by:
25  25      [..]
    26   +
    27   +Caused by:
    28   +  Broken pipe (os error 32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testing-cargo-itselfArea: cargo's testsC-bugCategory: bugS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewZ-gitoxideNightly: gitoxide integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions