Skip to content
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

git migration: don't prompt interactively for clone credentials #15902

Merged
merged 3 commits into from
May 17, 2021

Conversation

noerw
Copy link
Member

@noerw noerw commented May 16, 2021

fix #15230 for git v2.3 and newer (as pointed out by @KN4CK3R in #15230 (comment))

If someone has a pointer how & where to fix it for older git versions, let me know (so far I'm very unfamiliar with gitea's git backend)

@noerw noerw added this to the 1.15.0 milestone May 16, 2021
@noerw noerw added type/bug topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them backport/v1.14 labels May 16, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 16, 2021
@6543 6543 requested a review from zeripath May 16, 2021 17:26
@lafriks
Copy link
Member

lafriks commented May 16, 2021

Tests now fail

@KN4CK3R
Copy link
Member

KN4CK3R commented May 16, 2021

Could you add this deeper so it is not only used for clone? In #15157 I have added this to the RunInDirTimeoutEnvFullPipelineFunc method because it is needed for the push command too.

@noerw
Copy link
Member Author

noerw commented May 17, 2021

@KN4CK3R good point, changed that

Tests were failing because withKeyFile() sets env values via os.Setenv(), which got ignored since we ran RunInDirTimeoutEnvFullPipelineFunc() with non-nil env. This should be also fixed by the last change

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2021

Codecov Report

Merging #15902 (417aa03) into main (a32bfd8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #15902   +/-   ##
=======================================
  Coverage   44.01%   44.01%           
=======================================
  Files         681      681           
  Lines       82336    82340    +4     
=======================================
+ Hits        36237    36244    +7     
+ Misses      40195    40193    -2     
+ Partials     5904     5903    -1     
Impacted Files Coverage Δ
modules/git/command.go 87.96% <100.00%> (+0.46%) ⬆️
modules/queue/queue_channel.go 95.00% <0.00%> (-1.67%) ⬇️
models/repo_list.go 77.04% <0.00%> (-0.78%) ⬇️
services/pull/pull.go 43.83% <0.00%> (+0.45%) ⬆️
modules/process/manager.go 75.30% <0.00%> (+2.46%) ⬆️
models/unit.go 49.31% <0.00%> (+2.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 131b59e...417aa03. Read the comment docs.

@lunny lunny merged commit a137ee7 into go-gitea:main May 17, 2021
@zeripath
Copy link
Contributor

Thanks @noerw I knew that there was an option for this and meant to write a PR for it a long time ago!!

@6543 6543 deleted the fix-15230-git-hangs branch June 6, 2021 03:22
6543 pushed a commit to 6543-forks/gitea that referenced this pull request Jun 6, 2021
…itea#15902)

* don't prompt interactively for clone credentials

* apply GIT_TERMINAL_PROMPT=0 to all git cmds

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@6543 6543 added the backport/done All backports for this PR have been created label Jun 6, 2021
@6543
Copy link
Member

6543 commented Jun 6, 2021

-> #16082

lunny added a commit that referenced this pull request Jun 6, 2021
…) (#16082)

* don't prompt interactively for clone credentials

* apply GIT_TERMINAL_PROMPT=0 to all git cmds

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
…itea#15902)

* don't prompt interactively for clone credentials

* apply GIT_TERMINAL_PROMPT=0 to all git cmds

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git-migration of private repo without credentials hangs indefinitely
8 participants