Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Error on adding new ssh key to keystore: msg="illegal base64 data at input byte 49" #1951

Closed
mcgru opened this issue Apr 18, 2024 · 2 comments

Comments

@mcgru
Copy link

mcgru commented Apr 18, 2024

While adding a new ssh key to key store got "Request failed with status code 400" in modal window "New Key".

Semaphore version: v2.9.64
docker image: semaphoreui/semaphore:latest (c0068bfcb298)
use both nginx proxy and direct on :3000 port

Key name: k1
Type: SSH Key
Private key: tried both ed25519 and RSA

@mcgru
Copy link
Author

mcgru commented Apr 18, 2024

Error in log:

semaphore_1  | time="2024-04-18T13:02:36Z" level=error msg="close tcp 172.22.0.3:3000->172.22.0.1:52050: use of closed network connection" fields.level=Error
semaphore_1  | 
semaphore_1  | time="2024-04-18T13:02:59Z" level=error msg="illegal base64 data at input byte 49"
semaphore_1  | goroutine 98 [running]:
semaphore_1  | runtime/debug.Stack()
semaphore_1  | 	/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
semaphore_1  | runtime/debug.PrintStack()
semaphore_1  | 	/usr/local/go/src/runtime/debug/stack.go:16 +0x13
semaphore_1  | github.com/ansible-semaphore/semaphore/api/helpers.WriteError({0x1e6ce60, 0xc00012e0e0}, {0x1e682e0?, 0x22e7108?})
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/api/helpers/helpers.go:111 +0x195
semaphore_1  | github.com/ansible-semaphore/semaphore/api/projects.AddKey({0x1e6ce60, 0xc00012e0e0}, 0xc000140798?)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/api/projects/keys.go:91 +0x626
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0x7a20edd0?, {0x1e6ce60?, 0xc00012e0e0?}, 0x957f87?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | github.com/ansible-semaphore/semaphore/api.Route.GetMustCanMiddleware.func4.1({0x1e6ce60, 0xc00012e0e0}, 0xc0000f9b00)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/api/projects/project.go:59 +0x127
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0xc0000f9b00?, {0x1e6ce60?, 0xc00012e0e0?}, 0xbffda0?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | github.com/ansible-semaphore/semaphore/api/projects.ProjectMiddleware.func1({0x1e6ce60, 0xc00012e0e0}, 0x1?)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/api/router.go:35 +0x28
semaphore_1  | github.com/ansible-semaphore/semaphore/db.StoreSession({0x1e791f0, 0xc0000ae698}, {0xc0003fc730, 0xc}, 0xc0004bd7b8)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/db/Store.go:432 +0x5f
semaphore_1  | github.com/ansible-semaphore/semaphore/api.StoreMiddleware.func1({0x1e6ce60?, 0xc0001be000}, 0xc0000f9c00)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/api/router.go:34 +0xf5
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0xc0000f9c00?, {0x1e6ce60?, 0xc0001be000?}, 0xbe6f80?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | github.com/ansible-semaphore/semaphore/cli/cmd.runService.func1.1({0x1e6ce60, 0xc0001be000}, 0xc00024aab0?)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/cli/cmd/root.go:74 +0xea
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0xc00005c800?, {0x1e6ce60?, 0xc0001be000?}, 0xc0004bd8e8?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | github.com/ansible-semaphore/semaphore/api.Route.CORSMethodMiddleware.func1.1({0x1e6ce60, 0xc0001be000}, 0xc00024a930?)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/vendor/github.com/gorilla/mux/middleware.go:51 +0x88
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0xc0000f9700?, {0x1e6ce60?, 0xc0001be000?}, 0x232f3e0?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000f00c0, {0x1e6ce60, 0xc0001be000}, 0xc0000f8000)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/vendor/github.com/gorilla/mux/mux.go:212 +0x1c5
semaphore_1  | github.com/ansible-semaphore/semaphore/cli/cmd.runService.ProxyHeaders.func2({0x1e6ce60, 0xc0001be000}, 0xc0000f8000)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/vendor/github.com/gorilla/handlers/proxy_headers.go:59 +0x143
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0xc00038aae5?, {0x1e6ce60?, 0xc0001be000?}, 0x10?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | github.com/ansible-semaphore/semaphore/cli/cmd.runService.cropTrailingSlashMiddleware.func3({0x1e6ce60, 0xc0001be000}, 0xc0000f8000)
semaphore_1  | 	/go/src/github.com/ansible-semaphore/semaphore/cli/cmd/server.go:27 +0xbd
semaphore_1  | net/http.HandlerFunc.ServeHTTP(0x4107c5?, {0x1e6ce60?, 0xc0001be000?}, 0xc0001be001?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2136 +0x29
semaphore_1  | net/http.serverHandler.ServeHTTP({0x1e6a930?}, {0x1e6ce60?, 0xc0001be000?}, 0x6?)
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2938 +0x8e
semaphore_1  | net/http.(*conn).serve(0xc00017a120, {0x1e6ec58, 0xc000202570})
semaphore_1  | 	/usr/local/go/src/net/http/server.go:2009 +0x5f4
semaphore_1  | created by net/http.(*Server).Serve in goroutine 1
semaphore_1  | 	/usr/local/go/src/net/http/server.go:3086 +0x5cb

@mcgru mcgru changed the title Error on adding new ssh key to keystore Error on adding new ssh key to keystore: msg="illegal base64 data at input byte 49" Apr 18, 2024
@mcgru
Copy link
Author

mcgru commented Apr 18, 2024

After download .deb , installing binary and running semaphore program standalone (not in docker) - ssh key added flawlessly.

@semaphoreui semaphoreui locked and limited conversation to collaborators May 10, 2024
@fiftin fiftin converted this issue into discussion #2012 May 10, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant