Comments (6)
This issue #44 offers some solution, but I don't want
Index hosted on private GitLab repo, I prefer index to be hosted by Alexandrie itself.
from alexandrie.
Hello !
I'm sorry about the struggle you encountered.
I tried to write sufficient amounts of docs to make the installation process as clear and painless as I could, but, as someone who always knew the project, it can be hard to properly put myself in the shoes of newcomers and not missing anything (because of a subtle assumption we happened to inadvertently make).
This kind of feedback is super valuable to improve these docs against these mistakes, so thank you for filing the issue.
I'll be pushing a PR to try to address this and explain the placeholders in more details.
In the meantime, to come back to your specific issue, the main question can be:
Is your index accessible through HTTP/HTTPS or SSH ?
The HTTP/HTTPS case is the one that should just work by following the README.
The SSH case can require the solution found in #44, which isn't really specific to GitLab, it should apply to any private index located behind an SSH-authenticated endpoint.
(But we have yet to document that part in the README and the book, that is definitely on me, sorry again about that)
As an example, we're using the SSH method in exactly this way in our automated end-to-end testing setup, you can try to take a look at how it configures things here and see if it matches your situation:
https://github.com/Hirevo/alexandrie/blob/master/e2e/images/runner/runner.sh#L72
from alexandrie.
Is your index accessible through HTTP/HTTPS or SSH ?
Your question assumes that I already have an index, but as a newbie I don't.
But the tests (you pointed out with the link) contain valuable information, especially this file will help me set one up:
https://github.com/Hirevo/alexandrie/blob/master/e2e/images/index/init-repo.sh
What I was asking in bold, is all here in the tests now I think.
from alexandrie.
The install/configure procedure I followed is documented as a script.
Before running it a git repo needs to be created for the crate-index. (I used gitlab).
The script will prompt for the URL of this repo, or optionally the URL can be specified as the argument for the script.
#!/bin/bash
alex_dir=~/alexandrie
crate_index_git_url=$1
while ! git ls-remote -h $crate_index_git_url
do
read -p 'crate_index_git_url: ' crate_index_git_url
done
if ! curl --version
then
sudo apt update
sudo apt install -y curl
fi
if ! ~/.cargo/bin/rustup --version
then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
else
rustup update
fi
if [ -d "$alex_dir" ]
then
cd "$alex_dir"
git pull
else
git clone https://github.com/Hirevo/alexandrie.git "$alex_dir"
cd "$alex_dir"
fi
cargo build
mkdir -p crate-storage
if [ -d crate-index ]
then
cd crate-index
git pull
else
git clone $crate_index_git_url crate-index
cd crate-index
fi
if [ ! -f config.json ]
then
cat >config.json <<EOF
{
"dl": "http://$(hostname):3000/api/v1/crates/{crate}/{version}/download",
"api": "http://$(hostname):3000",
"allowed-registries": ["https://github.com/rust-lang/crates.io-index"]
}
EOF
git add config.json
git commit -m "add config.json"
git push
fi
The myhello project's .cargo/config file:
[registries.my-registry]
index = "ssh://[email protected]/gitusername/crate-index.git"
After logging in publish worked
cargo login --registry my-registry
cargo publish --registry my-registry
from alexandrie.
(Sorry for the delayed response)
Happy to hear that you were able to make progress, I've opened #70 to improve documentation around setting up the crate index, which, I have to agree, was notably overlooked.
As part of that PR, I have also integrated a slightly modified version of your script in the user guide, with a link to it from the project's README.
(link to the modified script in docs)
Such a script can indeed be useful and can make the process of getting started faster for newcomers.
Thank you very much for writing and sharing the script, it is a valuable thing to have available.
This issue is set to close automatically once #70 gets merged.
If you consider that the issue remains unaddressed by #70, feel free to say so (or re-open the issue if it got closed in-between).
from alexandrie.
I have looked at the documentation updates, and agree to close this.
from alexandrie.
Related Issues (20)
- "The published version is too low" - why is that an error? HOT 3
- Some potential data racing issues
- Self-modifying login form password field interferes with the Firefox remember password feature
- ERROR: insert or update on table "sessions" violates foreign key constraint "sessions_author_id_fkey" HOT 1
- After updating to Merge pull request #116 ,i can't publish new version of crates
- Question about database and build process
- Best method to remove/delete a crate HOT 1
- Enable git HTTPS authentication via username/password
- TLS support HOT 3
- Cargo checksum verification fails HOT 14
- Running error!!![frontend] missing field `origin` HOT 4
- cargo owner --add error HOT 4
- Consider switching to tokio/axum/hyper stack HOT 9
- Add `WebIdentityProvider` to AWS credentials chain
- IO error: No such file or directory (os error 2) HOT 1
- feat: verdaccio equivalent
- Consider if migrating to `tower-sessions` is appropriate HOT 8
- Option to enable authentication for all cargo API routes HOT 2
- Hide login and register buttons if they are disabled HOT 1
- Adding Categories and Keywords pages to help browsing and discovering of new crates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexandrie.