-
Notifications
You must be signed in to change notification settings - Fork 144
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
Beginner issue: what is the format for the authorized user keys in config.yaml? #63
Comments
it should be in the authorized keys format, e.g. public-keys:
- ssh-rsa AAAAB3Nz... # etc
- ssh-ed25519 AAAA... # etc |
Ah that's what I thought! It didn't seem to work for me... Let me try again, maybe I had a small typo |
Ah now since I can't launch soft due to the config error, I have no way to push the new config changes to the soft git server... Is there a way to launch soft in some sort of 'safe' mode, or to simple wipe everything and start again? I'm assuming simply deleting the |
can you share your config? you should be able to clone it locally with: git clone ~/.repos/config config
cat config/config.yaml judging by That said, yes, you can simply delete the config repo. |
(sorry, didn't mean to close it yet) |
Cloning it locally worked! I'm not sure why that didn't occur to me hahaha Committed and pushed again and it works now! I'm guessing I just accidentally included a tab or something that yaml didn't like when I first tried using the RSA format. Thanks so much!! I was not expecting to be helped this quickly! I'm excited to continue exploring the charmbracelet ecosystem ^^ |
ah, amazing! glad I could help 😊 since its fixed, will close, feel free to reopen/comment if needed 🙏 |
OH OOPS sorry to reopen this but it turns out it wasn't working after all?? I thought it was when it launched again after committing directly to the ./repos/config, but after changing the config to a different username it threw the same error as before
Yes, here it is! # The name of the server to show in the TUI.
name: Soft Serve
# The host and port to display in the TUI. You may want to change this if your
# server is accessible from a different host and/or port that what it's
# actually listening on (for example, if it's behind a reverse proxy).
host: localhost
port: 23338
# Access level for anonymous users. Options are: read-write, read-only and
# no-access.
anon-access: read-only
# You can grant read-only access to users without private keys. Any password
# will be accepted.
allow-keyless: false
# Customize repo display in the menu. Only repos in this list will appear in
# the TUI.
repos:
- name: Home
repo: config
private: true
note: "Configuration and content repo for this server"
users:
- name: wych
admin: true
public-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCcd/CLuQY7Li7IRzlheg3fL32ZjMbCZ/N6PuHZXnW95M3KttwjlGsnDTt5GQXWGfarmIFhLogN0i3rajDp8ctBf7dsbN+3nY1wbSufgD7rl6n6wz4lyXAfUZM7/gjoS7gomcq1k1FtJ9G9HyUeY3BQGeM7XOm+0kXzlBmxRfBqI2UmelkqX8p5CeNELZmxcuMAdbxSdUHZ4apc1pPUQP1TxHwMj4qQaudsva9+Hxqp42ZInsIcKX3popwayXDAGzPL3t5lVorGaam/fPl7MENXQhHjYz0kdY4frI3n8SqI8ZSQ14jDPjwDddYy+7VZFOAcrOV44YfiJT3sBL0lSVtXamd2WXuufsyf6Py2v8Z8j5MGPLbKPlRtWzpn6cB5/aBKqhcb2+LsaYeNkNxRWE3KZVK0R6/wNpCRjfQv6E18lc/5S3lIBvRqTke0RJxhrIpZCRVJWuluS61ZXqkd/+tYmynk0PdEqkGBO9e7lMh791kHxTq6jBDtP1/BmvFrhgM=
# - name: Example User
# collab-repos:
# - REPO
# public-keys:
# - KEY TEXT
|
I see the issue!! Users was indented a space when I was removing the #'s around it. I'll fix it! |
okay i have a NEW issue, one I'll make into a new thread in a bit if it's needed After deleting the .repos/config folder, running soft again does not seem to recreate it like I'm assuming it should?? After making an error I decided to delete it to start from complete scratch, but now I can't edit the config. Sorry to annoy you again @caarlos0, but is there another step after deleting the repo to regenerate it? I'm sorry for all the trouble 😓 |
Hi, @wychwitch! I work with Carlos. I'm not able to reproduce this via
…the Some internal references: I believe the config repo will be created on startup if it doesn't exist here: soft-serve/internal/config/config.go Line 84 in 63a85f0
…via this method: soft-serve/internal/config/config.go Line 125 in 63a85f0
|
Weird! When I try that now, I get the following error:
Then it immediately quits. I'm running debian 10! If it makes any difference, I tried using docker in the meantime to see if I that would work better (it didn't, for other reasons not relevant for this right now) Thank you both for the help!! |
Oh sorry!! I thought I answered this, yes, I checked and ~./repos is empty completely |
How odd. And this is happening on a normal partition (not on, say, a networked partition or in Also, does it work if you It looks like the error is happening here: Line 34 in 33176d0
Specifically here: soft-serve/internal/git/git.go Line 87 in 33176d0
(Since the error is coming from |
Yes! This was in my home folder.
That worked!! I was able to clone the config repo, edited it to include an admin user and commit/pushed it! However, I am unable to access the server from other computers on my local network. On the server itself I can still clone the config repo just fine, or ssh to itself. But when I try on another computer, I get a password prompt that always denies no matter what I put in there. To be clear, this is how I'm attempting to clone from the server:
I made sure to set the soft host to # The name of the server to show in the TUI.
name: Soft Serve!
# The host and port to display in the TUI. You may want to change this if your
# server is accessible from a different host and/or port that what it's
# actually listening on (for example, if it's behind a reverse proxy).
host: 192.168.XXX.XXX
port: 23231
# Access level for anonymous users. Options are: read-write, read-only and
# no-access.
anon-access: read-write
# You can grant read-only access to users without private keys. Any password
# will be accepted.
allow-keyless: false
# Customize repo display in the menu. Only repos in this list will appear in
# the TUI.
repos:
- name: Home
repo: config
private: true
note: "Configuration and content repo for this server"
users:
- name: wych
admin: true
public-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCcd/CLuQY7Li7IRzlheg3fL32ZjMbCZ/N6PuHZXnW95M3KttwjlGsnDTt5GQXWGfarmIFhLogN0i3rajDp8ctBf7dsbN+3nY1wbSufgD7rl6n6wz4lyXAfUZM7/gjoS7gomcq1k1FtJ9G9HyUeY3BQGeM7XOm+0kXzlBmxRfBqI2UmelkqX8p5CeNELZmxcuMAdbxSdUHZ4apc1pPUQP1TxHwMj4qQaudsva9+Hxqp42ZInsIcKX3popwayXDAGzPL3t5lVorGaam/fPl7MENXQhHjYz0kdY4frI3n8SqI8ZSQ14jDPjwDddYy+7VZFOAcrOV44YfiJT3sBL0lSVtXamd2WXuufsyf6Py2v8Z8j5MGPLbKPlRtWzpn6cB5/aBKqhcb2+LsaYeNkNxRWE3KZVK0R6/wNpCRjfQv6E18lc/5S3lIBvRqTke0RJxhrIpZCRVJWuluS61ZXqkd/+tYmynk0PdEqkGBO9e7lMh791kHxTq6jBDtP1/BmvFrhgM=
# - name: Example User
# collab-repos:
# - REPO
# public-keys:
# - KEY TEXT Also, does the name put in the config.yaml have to match the username of the user actually running the program with the |
What address are you binding
The username in the config is just for your internal record keeping. Users will connect via Soft Serve's internal SSH server, which will run on the host as whichever user is running
|
HUH.. I tried it again on my other computer and it worked! I thought it might've had something to do with my other computer using cygwin, so I installed it and it STILL worked! I ran ssh -v. and it turns out I'm encountering the same issue as #48 I guess this is solved? I can continue providing more info or logs in that issue instead! For what it's worth, running Sorry for this being such a saga! |
Hello! I know this is a beginner's issue, but I've been pulling my hair out over trying to get user keys working.
The example lists this format for creating authorized users:
To me, KEY TEXT was vague, and ended up trying the following options without success:
Every time I got the error
bad yaml in config.yaml: yaml: line 25: did not find expected key
I know I'm missing something obvious, is there a specific file that the ssh key needs to be stored in first? Is the format incorrect? Any help would be great.
I'm running soft on a debian server, and I installed using homebrew.
The text was updated successfully, but these errors were encountered: