mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-22 04:33:42 +09:00
fix: classify git failures on stderr, restrict migration failure detail (#39010)
Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
|
||||
</div>
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline required field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline required field">
|
||||
<label for="aws_access_key_id">{{ctx.Locale.Tr "repo.migrate.codecommit.aws_access_key_id"}}</label>
|
||||
<input id="aws_access_key_id" name="aws_access_key_id" value="{{.aws_access_key_id}}" required>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline required field">
|
||||
<label for="aws_secret_access_key">{{ctx.Locale.Tr "repo.migrate.codecommit.aws_secret_access_key"}}</label>
|
||||
<input id="aws_secret_access_key" name="aws_secret_access_key" type="password" value="{{.aws_secret_access_key}}" required>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline required field">
|
||||
<label for="auth_username">{{ctx.Locale.Tr "repo.migrate.codecommit.https_git_credentials_username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" required>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline required field">
|
||||
<label for="auth_password">{{ctx.Locale.Tr "repo.migrate.codecommit.https_git_credentials_password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}" required>
|
||||
</div>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
{{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
|
||||
</div>
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
|
||||
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
|
||||
<a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
|
||||
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
|
||||
<a target="_blank" href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token">{{svg "octicon-question"}}</a>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
|
||||
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
|
||||
<a target="_blank" href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html">{{svg "octicon-question"}}</a>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_token">{{ctx.Locale.Tr "access_token"}}</label>
|
||||
<input id="auth_token" name="auth_token" type="password" autocomplete="new-password" value="{{.auth_token}}" {{if not .auth_token}} data-need-clear="true" {{end}}>
|
||||
<!-- <a target="_blank" href="https://docs.gitea.com/development/api-usage">{{svg "octicon-question"}}</a> -->
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_username">{{ctx.Locale.Tr "username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="auth_password">{{ctx.Locale.Tr "password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
|
||||
</div>
|
||||
|
||||
@@ -154,16 +154,16 @@
|
||||
<input id="mirror_address" name="mirror_address" value="{{$address.Address}}" required>
|
||||
<p class="help">{{ctx.Locale.Tr "repo.mirror_address_desc"}}</p>
|
||||
</div>
|
||||
<details class="ui optional field" {{if or .Err_Auth $address.Username}}open{{end}}>
|
||||
<details class="ui optional field" {{if $address.Username}}open{{end}}>
|
||||
<summary class="tw-p-1">
|
||||
{{ctx.Locale.Tr "repo.need_auth"}}
|
||||
</summary>
|
||||
<div class="tw-p-1">
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="mirror_username">{{ctx.Locale.Tr "username"}}</label>
|
||||
<input id="mirror_username" name="mirror_username" value="{{$address.Username}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<div class="inline field">
|
||||
<label for="mirror_password">{{ctx.Locale.Tr "password"}}</label>
|
||||
<input id="mirror_password" name="mirror_password" type="password" placeholder="{{if $address.Password}}{{ctx.Locale.Tr "repo.mirror_password_placeholder"}}{{else}}{{ctx.Locale.Tr "repo.mirror_password_blank_placeholder"}}{{end}}" value="" {{if not .mirror_password}}data-need-clear="true"{{end}} autocomplete="off">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user