Skip to content

Document how to cargo publish to local installation #54

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

Closed
ralph opened this issue Nov 21, 2014 · 8 comments
Closed

Document how to cargo publish to local installation #54

ralph opened this issue Nov 21, 2014 · 8 comments

Comments

@ralph
Copy link
Contributor

ralph commented Nov 21, 2014

I'm currently having a hard time figuring out how to push to my local crates.io installation. The --token part is pretty clear, but I don't know what to use as --host. I tried setting it to my local rust server http://localhost:8888, but from what I can see in the log it tries to do some kind of git request. So I forked the central https://github.com/rust-lang/crates.io-index repository, adjusting the https://github.com/rust-lang/crates.io-index/blob/master/config.json file to point to my local rust server, but I'm still getting an error:

cargo publish --host https://github.com/ralph/crates.io-index --token XrD3BRBV4IH1yxBw5sNMVWjS66ruVEbq --verbose                                                                                      ⏎ ✱
    Updating registry `https://github.com/ralph/crates.io-index`
Warning: manifest has no description or license. See http://doc.crates.io/manifest.html#package-metadata for more info.
   Uploading zcolor v0.0.1 (file:///Users/ralph/Documents/work/rust/color-rs)
http error: Couldn't connect to server

(That's my local crates.io token in the snippet.)

I'm trying to push the color-rs package (https://github.com/bjz/color-rs) from the Guide (http://doc.crates.io/guide.html), btw., but have the package name changed to zcolor.

Can you help me publish to my local crates.io? I'd like to have a few packages in there, in order to be able to play with the Ember code.

Also, is there a better way to get sample data?

@ralph
Copy link
Contributor Author

ralph commented Nov 21, 2014

To answer my own question: I had to change config.json to http://127.0.0.1:8888 instead of http://localhost:8888 to get this working. I'm now getting an error from Amazon:

<Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

I hope I can figure that one out…

@ralph
Copy link
Contributor Author

ralph commented Nov 21, 2014

The error above was caused by the new AWS Frankfurt location being super strict. I tried creating a bucket in Ireland, now I get:

Caused by: Peer certificate cannot be authenticated with given CA certificates

@ralph
Copy link
Contributor Author

ralph commented Nov 21, 2014

All S3 errors are gone when using a bucket in the US Standard region. Now that's where I am:

0:conduit-log-requests::: 127.0.0.1 [2014-11-21T14:35:37+01:00] Put /api/v1/crates/new - 1352ms 500: could not add crate `zomglol_hello_world` to the git repo
Caused by: [23] authentication required but no callback set

@alexcrichton
Copy link
Member

Ok, I added some bits to the README about this, but let me know if anything is unclear!

@alexcrichton
Copy link
Member

Oh I forgot to set up config.json... I may just add a script to do this!

@alexcrichton
Copy link
Member

Script added!

@ralph
Copy link
Contributor Author

ralph commented Nov 24, 2014

Thank you thank you thank you, looking great! 😄

@metaclips
Copy link

Hello @ralph how were you able to generate your token locally

Turbo87 pushed a commit that referenced this issue Dec 8, 2022
Turbo87 pushed a commit that referenced this issue Jan 4, 2023
Co-authored-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants