Skip to content

Commit f5c010b

Browse files
committed
merge main branch
2 parents 01c2057 + 3b804ff commit f5c010b

File tree

168 files changed

+3268
-2586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+3268
-2586
lines changed

CHANGELOG.md

Lines changed: 197 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,203 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7-
## [1.17.4](https://github.com/go-gitea/gitea/releases/tag/1.17.4) - 2022-12-21
7+
## [1.18.0](https://github.com/go-gitea/gitea/releases/tag/v1.18.0) - 2022-12-29
8+
9+
* SECURITY
10+
* Remove ReverseProxy authentication from the API (#22219) (#22251)
11+
* Support Go Vulnerability Management (#21139)
12+
* Forbid HTML string tooltips (#20935)
13+
* BREAKING
14+
* Rework mailer settings (#18982)
15+
* Remove U2F support (#20141)
16+
* Refactor `i18n` to `locale` (#20153)
17+
* Enable contenthash in filename for dynamic assets (#20813)
18+
* FEATURES
19+
* Add color previews in markdown (#21474)
20+
* Allow package version sorting (#21453)
21+
* Add support for Chocolatey/NuGet v2 API (#21393)
22+
* Add API endpoint to get changed files of a PR (#21177)
23+
* Add filetree on left of diff view (#21012)
24+
* Support Issue forms and PR forms (#20987)
25+
* Add support for Vagrant packages (#20930)
26+
* Add support for `npm unpublish` (#20688)
27+
* Add badge capabilities to users (#20607)
28+
* Add issue filter for Author (#20578)
29+
* Add KaTeX rendering to Markdown. (#20571)
30+
* Add support for Pub packages (#20560)
31+
* Support localized README (#20508)
32+
* Add support mCaptcha as captcha provider (#20458)
33+
* Add team member invite by email (#20307)
34+
* Added email notification option to receive all own messages (#20179)
35+
* Switch Unicode Escaping to a VSCode-like system (#19990)
36+
* Add user/organization code search (#19977)
37+
* Only show relevant repositories on explore page (#19361)
38+
* User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133)
39+
* Add sitemap support (#18407)
40+
* Allow creation of OAuth2 applications for orgs (#18084)
41+
* Add system setting table with cache and also add cache supports for user setting (#18058)
42+
* Add pages to view watched repos and subscribed issues/PRs (#17156)
43+
* Support Proxy protocol (#12527)
44+
* Implement sync push mirror on commit (#19411)
45+
* API
46+
* Allow empty assignees on pull request edit (#22150) (#22214)
47+
* Make external issue tracker regexp configurable via API (#21338)
48+
* Add name field for org api (#21270)
49+
* Show teams with no members if user is admin (#21204)
50+
* Add latest commit's SHA to content response (#20398)
51+
* Add allow_rebase_update, default_delete_branch_after_merge to repository api response (#20079)
52+
* Add new endpoints for push mirrors management (#19841)
53+
* ENHANCEMENTS
54+
* Add setting to disable the git apply step in test patch (#22130) (#22170)
55+
* Multiple improvements for comment edit diff (#21990) (#22007)
56+
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21928)
57+
* Fix flex layout for repo list icons (#21896) (#21920)
58+
* Fix vertical align of committer avatar rendered by email address (#21884) (#21918)
59+
* Fix setting HTTP headers after write (#21833) (#21877)
60+
* Color and Style enhancements (#21784, #21799) (#21868)
61+
* Ignore line anchor links with leading zeroes (#21728) (#21776)
62+
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) (#21738)
63+
* Use CSS color-scheme instead of invert (#21616) (#21623)
64+
* Respect user's locale when rendering the date range in the repo activity page (#21410)
65+
* Change `commits-table` column width (#21564)
66+
* Refactor git command arguments and make all arguments to be safe to be used (#21535)
67+
* CSS color enhancements (#21534)
68+
* Add link to user profile in markdown mention only if user exists (#21533, #21554)
69+
* Add option to skip index dirs (#21501)
70+
* Diff file tree tweaks (#21446)
71+
* Localize all timestamps (#21440)
72+
* Add `code` highlighting in issue titles (#21432)
73+
* Use Name instead of DisplayName in LFS Lock (#21415)
74+
* Consolidate more CSS colors into variables (#21402)
75+
* Redirect to new repository owner (#21398)
76+
* Use ISO date format instead of hard-coded English date format for date range in repo activity page (#21396)
77+
* Use weighted algorithm for string matching when finding files in repo (#21370)
78+
* Show private data in feeds (#21369)
79+
* Refactor parseTreeEntries, speed up tree list (#21368)
80+
* Add GET and DELETE endpoints for Docker blob uploads (#21367)
81+
* Add nicer error handling on template compile errors (#21350)
82+
* Add `stat` to `ToCommit` function for speed (#21337)
83+
* Support instance-wide OAuth2 applications (#21335)
84+
* Record OAuth client type at registration (#21316)
85+
* Add new CSS variables --color-accent and --color-small-accent (#21305)
86+
* Improve error descriptions for unauthorized_client (#21292)
87+
* Case-insensitive "find files in repo" (#21269)
88+
* Consolidate more CSS rules, fix inline code on arc-green (#21260)
89+
* Log real ip of requests from ssh (#21216)
90+
* Save files in local storage as group readable (#21198)
91+
* Enable fluid page layout on medium size viewports (#21178)
92+
* File header tweaks (#21175)
93+
* Added missing headers on user packages page (#21172)
94+
* Display image digest for container packages (#21170)
95+
* Skip dirty check for team forms (#21154)
96+
* Keep path when creating a new branch (#21153)
97+
* Remove fomantic image module (#21145)
98+
* Make labels clickable in the comments section. (#21137)
99+
* Sort branches and tags by date descending (#21136)
100+
* Better repo API unit checks (#21130)
101+
* Improve commit status icons (#21124)
102+
* Limit length of repo description and repo url input fields (#21119)
103+
* Show .editorconfig errors in frontend (#21088)
104+
* Allow poster to choose reviewers (#21084)
105+
* Remove black labels and CSS cleanup (#21003)
106+
* Make e-mail sanity check more precise (#20991)
107+
* Use native inputs in whitespace dropdown (#20980)
108+
* Enhance package date display (#20928)
109+
* Display total blob size of a package version (#20927)
110+
* Show language name on hover (#20923)
111+
* Show instructions for all generic package files (#20917)
112+
* Refactor AssertExistsAndLoadBean to use generics (#20797)
113+
* Move the official website link at the footer of gitea (#20777)
114+
* Add support for full name in reverse proxy auth (#20776)
115+
* Remove useless JS operation for relative time tooltips (#20756)
116+
* Replace some icons with SVG (#20741)
117+
* Change commit status icons to SVG (#20736)
118+
* Improve single repo action for issue and pull requests (#20730)
119+
* Allow multiple files in generic packages (#20661)
120+
* Add option to create new issue from /issues page (#20650)
121+
* Background color of private list-items updated (#20630)
122+
* Added search input field to issue filter (#20623)
123+
* Increase default item listing size `ISSUE_PAGING_NUM` to 20 (#20547)
124+
* Modify milestone search keywords to be case insensitive again (#20513)
125+
* Show hint to link package to repo when viewing empty repo package list (#20504)
126+
* Add Tar ZSTD support (#20493)
127+
* Make code review checkboxes clickable (#20481)
128+
* Add "X-Gitea-Object-Type" header for GET `/raw/` & `/media/` API (#20438)
129+
* Display project in issue list (#20434)
130+
* Prepend commit message to template content when opening a new PR (#20429)
131+
* Replace fomantic popup module with tippy.js (#20428)
132+
* Allow to specify colors for text in markup (#20363)
133+
* Allow access to the Public Organization Member lists with minimal permissions (#20330)
134+
* Use default values when provided values are empty (#20318)
135+
* Vertical align navbar avatar at middle (#20302)
136+
* Delete cancel button in repo creation page (#21381)
137+
* Include login_name in adminCreateUser response (#20283)
138+
* fix: icon margin in user/settings/repos (#20281)
139+
* Remove blue text on migrate page (#20273)
140+
* Modify milestone search keywords to be case insensitive (#20266)
141+
* Move some files into models' sub packages (#20262)
142+
* Add tooltip to repo icons in explore page (#20241)
143+
* Remove deprecated licenses (#20222)
144+
* Webhook for Wiki changes (#20219)
145+
* Share HTML template renderers and create a watcher framework (#20218)
146+
* Allow enable LDAP source and disable user sync via CLI (#20206)
147+
* Adds a checkbox to select all issues/PRs (#20177)
148+
* Refactor `i18n` to `locale` (#20153)
149+
* Disable status checks in template if none found (#20088)
150+
* Allow manager logging to set SQL (#20064)
151+
* Add order by for assignee no sort issue (#20053)
152+
* Take a stab at porting existing components to Vue3 (#20044)
153+
* Add doctor command to write commit-graphs (#20007)
154+
* Add support for authentication based on reverse proxy email (#19949)
155+
* Enable spellcheck for EasyMDE, use contenteditable mode (#19776)
156+
* Allow specifying SECRET_KEY_URI, similar to INTERNAL_TOKEN_URI (#19663)
157+
* Rework mailer settings (#18982)
158+
* Add option to purge users (#18064)
159+
* Add author search input (#21246)
160+
* Make rss/atom identifier globally unique (#21550)
161+
* BUGFIXES
162+
* Auth interface return error when verify failure (#22119) (#22259)
163+
* Use complete SHA to create and query commit status (#22244) (#22257)
164+
* Update bleve and zapx to fix unaligned atomic (#22031) (#22218)
165+
* Prevent panic in doctor command when running default checks (#21791) (#21807)
166+
* Load GitRepo in API before deleting issue (#21720) (#21796)
167+
* Ignore line anchor links with leading zeroes (#21728) (#21776)
168+
* Set last login when activating account (#21731) (#21755)
169+
* Fix UI language switching bug (#21597) (#21749)
170+
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) (#21738)
171+
* Allow local package identifiers for PyPI packages (#21690) (#21727)
172+
* Deal with markdown template without metadata (#21639) (#21654)
173+
* Fix opaque background on mermaid diagrams (#21642) (#21652)
174+
* Fix repository adoption on Windows (#21646) (#21650)
175+
* Sync git hooks when config file path changed (#21619) (#21626)
176+
* Fix 500 on PR files API (#21602) (#21607)
177+
* Fix `Timestamp.IsZero` (#21593) (#21603)
178+
* Fix viewing user subscriptions (#21482)
179+
* Fix mermaid-related bugs (#21431)
180+
* Fix branch dropdown shifting on page load (#21428)
181+
* Fix default theme-auto selector when nologin (#21346)
182+
* Fix and improve incorrect error messages (#21342)
183+
* Fix formatted link for PR review notifications to matrix (#21319)
184+
* Center-aligning content of WebAuthN page (#21127)
185+
* Remove follow from commits by file (#20765)
186+
* Fix commit status popup (#20737)
187+
* Fix init mail render logic (#20704)
188+
* Use correct page size for link header pagination (#20546)
189+
* Preserve unix socket file (#20499)
190+
* Use tippy.js for context popup (#20393)
191+
* Add missing parameter for error in log message (#20144)
192+
* Do not allow organisation owners add themselves as collaborator (#20043)
193+
* Rework file highlight rendering and fix yaml copy-paste (#19967)
194+
* Improve code diff highlight, fix incorrect rendered diff result (#19958)
195+
* TESTING
196+
* Improve OAuth integration tests (#21390)
197+
* Add playwright tests (#20123)
198+
* BUILD
199+
* Switch to building with go1.19 (#20695)
200+
* Update JS dependencies, adjust eslint (#20659)
201+
* Add more linters to improve code readability (#19989)
202+
203+
## [1.17.4](https://github.com/go-gitea/gitea/releases/tag/v1.17.4) - 2022-12-21
8204

9205
* SECURITY
10206
* Do not allow Ghost access to limited visible user/org (#21849) (#21875)

assets/emoji.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/generate-emoji.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
const (
2727
gemojiURL = "https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json"
28-
maxUnicodeVersion = 12
28+
maxUnicodeVersion = 14
2929
)
3030

3131
var flagOut = flag.String("o", "modules/emoji/emoji_data.go", "out")
@@ -189,6 +189,10 @@ func generate() ([]byte, error) {
189189
}
190190
}
191191

192+
sort.Slice(data, func(i, j int) bool {
193+
return data[i].Aliases[0] < data[j].Aliases[0]
194+
})
195+
192196
// add header
193197
str := replacer.Replace(fmt.Sprintf(hdr, gemojiURL, data))
194198

docs/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21-
version: 1.17.4
21+
version: 1.18.0
2222
minGoVersion: 1.18
2323
goVersion: 1.19
24-
minNodeVersion: 14
24+
minNodeVersion: 16
2525
search: nav
2626
repo: "https://github.com/go-gitea/gitea"
2727
docContentPath: "docs/content"

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,9 @@ and
782782

783783
- `GRAVATAR_SOURCE`: **gravatar**: Can be `gravatar`, `duoshuo` or anything like
784784
`http://cn.gravatar.com/avatar/`.
785-
- `DISABLE_GRAVATAR`: **false**: Enable this to use local avatars only.
785+
- `DISABLE_GRAVATAR`: **false**: Enable this to use local avatars only. **DEPRECATED [v1.18+]** moved to database. Use admin panel to configure.
786786
- `ENABLE_FEDERATED_AVATAR`: **false**: Enable support for federated avatars (see
787-
[http://www.libravatar.org](http://www.libravatar.org)).
787+
[http://www.libravatar.org](http://www.libravatar.org)). **DEPRECATED [v1.18+]** moved to database. Use admin panel to configure.
788788

789789
- `AVATAR_STORAGE_TYPE`: **default**: Storage type defined in `[storage.xxx]`. Default is `default` which will read `[storage]` if no section `[storage]` will be a type `local`.
790790
- `AVATAR_UPLOAD_PATH`: **data/avatars**: Path to store user avatar image files.

docs/content/doc/installation/from-package.en-us.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ Arch Linux ARM provides packages for [aarch64](https://archlinuxarm.org/packages
4343
pacman -S gitea
4444
```
4545

46+
## Gentoo Linux
47+
48+
The rolling release distribution has [Gitea](https://packages.gentoo.org/packages/www-apps/gitea) in their official community repository and package updates are provided with new Gitea releases.
49+
50+
```sh
51+
emerge gitea -va
52+
```
53+
4654
## Canonical Snap
4755

4856
There is a [Gitea Snap](https://snapcraft.io/gitea) package which follows the latest stable version.

docs/content/doc/usage/email-setup.en-us.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@ The following configuration should work with GMail's SMTP server:
7676
```ini
7777
[mailer]
7878
ENABLED = true
79+
HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0
7980
SMTP_ADDR = smtp.gmail.com
8081
SMTP_PORT = 465
81-
82-
USER = example@gmail.com
82+
FROM = example.user@gmail.com
83+
USER = example.user
8384
PASSWD = ***
8485
MAILER_TYPE = smtp
8586
IS_TLS_ENABLED = true
86-
HELO_HOSTNAME = example.com
8787
```
88+
89+
Note that you'll need to create and use an [App password](https://support.google.com/accounts/answer/185833?hl=en) by enabling 2FA on your Google
90+
account. You won't be able to use your Google account password directly.

docs/content/page/index.de-de.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
date: "2016-11-08T16:00:00+02:00"
2+
date: "2023-01-07T22:03:00+01:00"
33
title: "Dokumentation"
44
slug: "documentation"
55
url: "/de-de/"
@@ -27,11 +27,11 @@ Gitea ist ein [Gogs](http://gogs.io)-Fork.
2727
* 2 CPU Kerne und 1GB RAM sind für kleine Teams/Projekte ausreichend.
2828
* Gitea sollte unter einem seperaten nicht-root Account auf UNIX-Systemen ausgeführt werden.
2929
* Achtung: Gitea verwaltet die `~/.ssh/authorized_keys` Datei. Gitea unter einem normalen Benutzer auszuführen könnte dazu führen, dass dieser sich nicht mehr anmelden kann.
30-
* [Git](https://git-scm.com/) Version 2.0 oder später wird benötigt.
31-
* Wenn git >= 2.1.2. und [Git large file storage](https://git-lfs.github.com/) aktiviert ist, dann wird es auch in Gitea verwendbar sein.
32-
* Wenn git >= 2.18, dann wird das Rendern von Commit-Graphen automatisch aktiviert.
30+
* [Git](https://git-scm.com/) Version 2.0 oder aktueller wird benötigt.
31+
* Wenn Git >= 2.1.2 und [Git LFS](https://git-lfs.github.com/) vorhanden ist, dann wird Git LFS Support automatisch für Gitea aktiviert.
32+
* Wenn Git >= 2.18, dann wird das Rendern von Commit-Graphen automatisch aktiviert.
3333

3434
## Browser Unterstützung
3535

36-
* Letzten 2 Versions von Chrome, Firefox, Safari und Edge
36+
* Die neuesten zwei Versionen von Chrome, Firefox, Safari und Edge
3737
* Firefox ESR

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ require (
3333
github.com/gliderlabs/ssh v0.3.5
3434
github.com/go-ap/activitypub v0.0.0-20220917143152-e4e7018838c0
3535
github.com/go-ap/jsonld v0.0.0-20220917142617-76bf51585778
36-
github.com/go-chi/chi/v5 v5.0.7
36+
github.com/go-chi/chi/v5 v5.0.8
3737
github.com/go-chi/cors v1.2.1
3838
github.com/go-enry/go-enry/v2 v2.8.3
3939
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
@@ -303,12 +303,12 @@ replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
303303

304304
replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
305305

306-
replace github.com/satori/go.uuid v1.2.0 => github.com/gofrs/uuid v4.2.0+incompatible
307-
308306
replace github.com/blevesearch/zapx/v15 v15.3.6 => github.com/zeripath/zapx/v15 v15.3.6-alignment-fix
309307

310308
exclude github.com/gofrs/uuid v3.2.0+incompatible
311309

312310
exclude github.com/gofrs/uuid v4.0.0+incompatible
313311

314312
exclude github.com/goccy/go-json v0.4.11
313+
314+
exclude github.com/satori/go.uuid v1.2.0

go.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ github.com/go-asn1-ber/asn1-ber v1.5.4 h1:vXT6d/FNDiELJnLb6hGNa309LMsrCoYFvpwHDF
475475
github.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
476476
github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
477477
github.com/go-chi/chi/v5 v5.0.4/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
478-
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
479-
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
478+
github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0=
479+
github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
480480
github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
481481
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
482482
github.com/go-enry/go-enry/v2 v2.8.3 h1:BwvNrN58JqBJhyyVdZSl5QD3xoxEEGYUrRyPh31FGhw=
@@ -596,7 +596,6 @@ github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA=
596596
github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
597597
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
598598
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
599-
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
600599
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
601600
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
602601
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=

models/activities/notification.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func CountNotifications(ctx context.Context, opts *FindNotificationOptions) (int
141141

142142
// CreateRepoTransferNotification creates notification for the user a repository was transferred to
143143
func CreateRepoTransferNotification(ctx context.Context, doer, newOwner *user_model.User, repo *repo_model.Repository) error {
144-
return db.AutoTx(ctx, func(ctx context.Context) error {
144+
return db.WithTx(ctx, func(ctx context.Context) error {
145145
var notify []*Notification
146146

147147
if newOwner.IsOrganization() {

models/asymkey/ssh_key_fingerprint.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package asymkey
55

66
import (
77
"context"
8-
"errors"
98
"fmt"
109
"strings"
1110

@@ -59,9 +58,9 @@ func calcFingerprintSSHKeygen(publicKeyContent string) (string, error) {
5958
if strings.Contains(stderr, "is not a public key file") {
6059
return "", ErrKeyUnableVerify{stderr}
6160
}
62-
return "", fmt.Errorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr)
61+
return "", util.NewInvalidArgumentErrorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr)
6362
} else if len(stdout) < 2 {
64-
return "", errors.New("not enough output for calculating fingerprint: " + stdout)
63+
return "", util.NewInvalidArgumentErrorf("not enough output for calculating fingerprint: %s", stdout)
6564
}
6665
return strings.Split(stdout, " ")[1], nil
6766
}

0 commit comments

Comments
 (0)