-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will also allow access to anonymous user connections with public-keys Fixes: #524
- Loading branch information
1 parent
f23ea48
commit a2cf786
Showing
4 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# vi: set ft=conf | ||
|
||
# start soft serve | ||
exec soft serve & | ||
# wait for server to start | ||
waitforserver | ||
|
||
# set settings | ||
soft settings allow-keyless true | ||
soft settings anon-access no-access | ||
|
||
# create a repo | ||
soft repo create repo1 | ||
git clone ssh://localhost:$SSH_PORT/repo1 repo1 | ||
mkfile ./repo1/README.md '# Hello\n\nwelcome' | ||
git -C repo1 add -A | ||
git -C repo1 commit -m 'first' | ||
git -C repo1 push origin HEAD | ||
|
||
# access repo from anon | ||
! ugit clone ssh://localhost:$SSH_PORT/repo1 urepo1 | ||
stderr 'Error: you are not authorized to do this' | ||
|
||
# list repo as anon | ||
usoft repo list | ||
stdout '' | ||
|
||
# create repo as anon | ||
! usoft repo create urepo2 | ||
stderr 'Error: unauthorized' | ||
|
||
# stop the server | ||
[windows] stopserver |