soft-serve icon indicating copy to clipboard operation
soft-serve copied to clipboard

Begginer problem: zsh:1: command not found: help

Open aravezskinteeth opened this issue 1 year ago • 1 comments

Describe the bug I have a git server with a repository and I'd like to use it with soft serve, but when I ssh into it as ssh [email protected] -i ~/.ssh/git-server -p 22 help, I get the following error zsh:1: command not found: help.

I also tried to use ssh soft but nothing comes up. I'm not sure if I did something wrong or if it's just a bug.

To Reproduce Steps to reproduce the behavior: First, I created my git server like this:

  1. I created another user in my machine called git.
  2. Since I'm on mac I enabled Remote Login in the admin user and gave access to the git user. I did the same on the git user (allowed access to the admin account).
  3. I changed the Local hostname as some.local.
  4. I entered the following commands:
su git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
  1. Then, I created a new ssh key pair, called git-server and git-server.pub. I copied public key's content and pasted on the git's user authorized_keys.
  2. I created a bare repository inside of the git's user.
mkdir ~/git-repos
chown git:staff git-repos/
cd git-repos && su git
ls -al # to check if it's owned by the git user
mkdir dotfiles.git && cd dotfiles.git
git init --bare
  1. I configured my dotfiles repo, located in the admin's account so I could push it to the git server.
nvim .dotfiles/.git/config
  1. I added the following:
[remote "home"]
	url = [email protected]:git-repos/dotfiles.git
	fetch = +refs/heads/*:refs/remotes/home/*
  1. Finally, I pushed my dotfiles repo to my git server:
git push home main
# My dotfiles repository is on my git server.

Then For the soft-serve part, I followed the README.md steps:

  1. I changed the default SOFT_SERVE_DATA_PATH and SOFT_SERVE_INITIAL_ADMIN_KEYSenvironmental variables:
# Inside .zshenv
export SOFT_SERVE_DATA_PATH=/Users/admin/.config/soft-serve
export SOFT_SERVE_INITIAL_ADMIN_KEYS=git-server.pub
  1. I entered the following command soft serve
  2. I changed the port that ssh uses:
sudo nvim /etc/ssh/sshd_config
# Uncomment `#Port 22`
# Change `Port 22` to `Port 2200`
  1. I configured config.yaml like this:
name: "User Repos"
log_format: "text"
ssh:
  listen_addr: ":22"
  public_url: "ssh://[email protected]:2200
  key_path: "ssh/soft_serve_host_ed25519"
  client_key_path: "ssh/soft_serve_client_ed25519"
  max_timeout: 0
  idle_timeout: 0
git:
  listen_addr: ":9418"
  max_timeout: 0
  idle_timeout: 3
  max_connections: 32
http:  
  listen_addr: ":443"
  tls_key_path: ""
  tls_cert_path: ""
  public_url: "http://[email protected]:4430"
stats:
  listen_addr: "localhost:23233"
initial_admin_keys:
  - "sssh-rsa AA... email sh-rsa"
  1. Adding soft to ~/.ssh/confg
Host soft
  HostName [email protected]
  Port 22
  IdentityFile ~/.ssh/git-server
  1. Configuring soft-serve
ssh [email protected] -i ~/.ssh/git-server -p 22 help
> ([email protected]) Password:
> zsh:1: command not found: help
ssh soft
# Keeps loading and nothing happens. The same error comes up if I use user create and settings.

Expected behavior I expect to being able to configure soft serve and access the TUI with my git server.

Screenshots SCR-20230508-sxne

Environment (please complete the following information):

  • OS: MacOS Monterrey 12.6.2
  • Terminal: kitty 0.28.0
  • Version: v0.5.0 (91a1e40)

aravezskinteeth avatar May 09 '23 02:05 aravezskinteeth

I tend to think this is a configuration issue, might as well try a simple test using the default configuration to rule out the problem.

export SOFT_SERVE_INITIAL_ADMIN_KEYS="ssh-ed25519 AAAAC3Nxxxxxxxxxxxxxx [email protected]"
./soft serve

After that, try again ssh localhost -p 23231 help

OfficialBoyfriend avatar Oct 25 '23 15:10 OfficialBoyfriend