Coder Social home page Coder Social logo

git-remote-s3's Issues

compilation fails with rustc-1.39.0

cargo build fails locally. I'm not really into rust, am I doing something wrong?

$ rustc --version
rustc 1.39.0

$ cargo --version
cargo 1.39.0

$ cargo build
   Compiling git-remote-s3 v0.1.1 (/home/me/code/mine/git-remote-s3)
error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, `}`, or an operator, found `None`
  --> src/main.rs:61:13
   |
60 |             Some(idx) => idx
   |                       --    - expected one of 8 possible tokens here
   |                       |
   |                       while parsing the `match` arm starting here
61 |             None =>
   |             ^^^^ unexpected token

error: expected one of `.`, `;`, `?`, or an operator, found `let`
  --> src/main.rs:65:9
   |
64 |         }
   |          - help: a semicolon may be missing here
65 |         let bucket = url.get(..slash).unwrap();
   |         ^^^

warning: unreachable statement
  --> src/main.rs:65:9
   |
59 |           let slash = match url.find('/') {
   |  _____________________-
60 | |             Some(idx) => idx
61 | |             None =>
62 | |               bail!("remote url does not appear to have a prefix. expected a url in the format s3://bucket/prefix")
63 | |               0
64 | |         }
   | |_________- any code following this expression is unreachable
65 |           let bucket = url.get(..slash).unwrap();
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
   |
   = note: `#[warn(unreachable_code)]` on by default

error: aborting due to 2 previous errors

error: could not compile `git-remote-s3`.

To learn more, run the command again with --verbose.

SignatureDoesNotMatch on git push

Performing git push --set-upstream s3remote master and getting:

Error: Couldn't list items in bucket
Caused by: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>
...

The remote url is in s3://my-bucket/test format

S3 redirect causing problems

Hi I am on OSX, and I installed v0.1.3 manually by downloading the binary. I set up the remote using:

git remote add s3remote s3://my-bucket/my-prefix

But am getting the following response from S3:

<Error><Code>PermanentRedirect</Code>
    <Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message>
    <Endpoint>my-bucket.s3.amazonaws.com</Endpoint>
    <Bucket>my-bucket</Bucket>
    <RequestId>MYCF501PGD6GVEMQ</RequestId>
    <HostId>hEJ7RV90uQXFUAm8dcyNLtdfHInwxpM5Rr1w6LfUuX8RHnATzyxtOaGrVCT4Lu2hTFMYqzhlb/s=</HostId>
</Error>

I tried using the following remote setup instead, but it fails to find the bucket this way:

git remote add s3remote s3://my-bucket.s3.amazonaws.com/my-prefix
and also
git remote add s3remote s3://my-bucket.s3.us-west-1.amazonaws.com/my-prefix

Any ideas?

Error executing s3remote

Details of my environment:

  • OS X
  • Checked out the repo using git. Did a cargo build and copied binary to PATH
> git push s3remote
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
stack backtrace:
   0: std::sys_common::backtrace::print
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::continue_panic_fmt
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::panicking::panic
   8: core::option::Option<T>::unwrap
   9: git_remote_s3::run
  10: git_remote_s3::main
  11: std::rt::lang_start::{{closure}}
  12: std::panicking::try::do_call
  13: __rust_maybe_catch_panic
  14: std::rt::lang_start_internal
  15: std::rt::lang_start
  16: main

Don't require a prefix in remote url

Currently you need to specify the git remote url in the format s3://bucket/prefix, but it might be useful to be able to not specify a prefix, in the event that you only ever want to push a single git repo to that bucket. See discussion in #1

Get "thread 'main' panicked at 'called `Option::unwrap()`" Error

Hello,

I installed git-remote-s3 though "cargo install git-remote-s3". I get the following error when I try to push repo. am i missing something? Thank you very much.

$ RUST_BACKTRACE=1 git push s3remote 
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/bc/.cargo/registry/src/github.com-1ecc6299db9ec823/git-remote-s3-0.1.3/src/main.rs:293:45
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::panicking::panic
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:48:5
   3: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
   4: itertools::Itertools::into_group_map
   5: git_remote_s3::list_remote_refs
   6: git_remote_s3::cmd_list
   7: git_remote_s3::cmd_loop
   8: git_remote_s3::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
  • cargo 1.64.0
  • OS: Ubuntu 22.04
  • rustc 1.64.0

Support git submodule

Is there way to s3 bucket as submodule like? Like:
git submodule add s3://my-bucket

Broken pipe error while clone

When cloning a repository, git-remote-s3 throw an error about 'Broken pipe'.

Here is the BACKTRACE

$ git clone s3://foo/git/bar
Cloning into 'bar'...
thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:1017:9
stack backtrace:
   0:        0x10264e348 - std::backtrace_rs::backtrace::libunwind::trace::hce65e3f7a6c49d1b
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:        0x10264e348 - std::backtrace_rs::backtrace::trace_unsynchronized::h8e403a36971945a4
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x10264e348 - std::sys_common::backtrace::_print_fmt::h01edb83516020417
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:66:5
   3:        0x10264e348 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdb141e7893323405
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:45:22
   4:        0x102669654 - core::fmt::write::hed96bcfc6342aee5
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/fmt/mod.rs:1194:17
   5:        0x102648788 - std::io::Write::write_fmt::h67807909d9a5a6e1
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/io/mod.rs:1655:15
   6:        0x10264fc94 - std::sys_common::backtrace::_print::h7267448814343cd4
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:48:5
   7:        0x10264fc94 - std::sys_common::backtrace::print::h83926e01abfb57bc
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:35:9
   8:        0x10264fc94 - std::panicking::default_hook::{{closure}}::h23ab3d10a9c5bb0f
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:295:22
   9:        0x10264f970 - std::panicking::default_hook::hfa3eb92a01f5118c
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:314:9
  10:        0x10265016c - std::panicking::rust_panic_with_hook::h94fcfaabb5f8247c
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:698:17
  11:        0x102650060 - std::panicking::begin_panic_handler::{{closure}}::h5c2b0281f2361f0b
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:588:13
  12:        0x10264e824 - std::sys_common::backtrace::__rust_end_short_backtrace::h48848f94b4985ec4
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:138:18
  13:        0x10264fdb8 - rust_begin_unwind
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
  14:        0x1026826a4 - core::panicking::panic_fmt::hfc743f4016412d36
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
  15:        0x102647bec - std::io::stdio::print_to::hf8e1372307c30663
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/io/stdio.rs:1017:9
  16:        0x102647bec - std::io::stdio::_print::hdecfefdeb43586ed
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/io/stdio.rs:1029:5
  17:        0x10237dd84 - git_remote_s3::cmd_loop::h06eccde7e87ded98
  18:        0x10237fd38 - git_remote_s3::main::hfc81c54735afb55d
  19:        0x102388844 - std::sys_common::backtrace::__rust_begin_short_backtrace::h68c22e560fd9c781
  20:        0x10238cf60 - std::rt::lang_start::{{closure}}::h20c02ec351995b2a
  21:        0x1026431f4 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h485d4c2966ec30a8
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:259:13
  22:        0x1026431f4 - std::panicking::try::do_call::h375a887be0bea938
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:492:40
  23:        0x1026431f4 - std::panicking::try::hecad40482ef3be15
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:456:19
  24:        0x1026431f4 - std::panic::catch_unwind::haf1f664eb41a88eb
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panic.rs:137:14
  25:        0x1026431f4 - std::rt::lang_start_internal::{{closure}}::h976eba434e9ff4cf
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:128:48
  26:        0x1026431f4 - std::panicking::try::do_call::h8f2501ab92e340b0
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:492:40
  27:        0x1026431f4 - std::panicking::try::hbeb9f8df83454d42
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:456:19
  28:        0x1026431f4 - std::panic::catch_unwind::h0a9390b2202af6e9
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panic.rs:137:14
  29:        0x1026431f4 - std::rt::lang_start_internal::hc453db0ee48af82e
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:128:20
  30:        0x102380058 - _main

OS: macOS 12.4
git version: git version 2.32.1 (Apple Git-133)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.