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

Add hint to GNUPGHOME environment variable #20134

Merged
merged 11 commits into from
Jul 10, 2022

Conversation

justusbunsi
Copy link
Member

With #19732, the default location for the .gnupg folder has changed. To mitigate this breaking change, users can specify the home directory for gnupg via $GNUPGHOME environment variable to keep using their current location.

With go-gitea#19732, the default location for the `.gnupg` folder has changed. To mitigate this breaking change, users can specify the home directory for gnupg via `$GNUPGHOME` environment variable to keep using their current location.
@justusbunsi justusbunsi added the type/docs This PR mainly updates/creates documentation label Jun 25, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 25, 2022
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@justusbunsi
Copy link
Member Author

Trimmed the explicit new line as suggested. I was not sure whether an explicit line break would help the readability.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 25, 2022

Trimmed the explicit new line as suggested. I was not sure whether an explicit line break would help the readability.

No worry in my mind. There will be no line break after rendering. There is no line break for the old document too. (two line breaks mean paragraph break when rendering)

image

image

@justusbunsi
Copy link
Member Author

CI failure seems unrelated.

@zeripath
Copy link
Contributor

Agh! this is a problem.

We shouldn't have set the repository root as the HOME directory.

This is not an appropriate directory especially as usernames can start with .

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 25, 2022

Agh! this is a problem.

I do not think it's a problem.

We shouldn't have set the repository root as the HOME directory.

repository.ROOT is the only directory can be used without breaking.No other directory (created by Gitea) could be used for the Git HOME. (overthinking, see new comment)

If we do not use repository.ROOT as Git HOME, then many users have to set an config option manually (a big breaking) (overthinking, see new comment)

This is not an appropriate directory especially as usernames can start with .

It won't. See the IsUsableUsername. OK, AlphaDashDotPattern is not ideal, it should be fixed.

Directories starting with dot have special meaning, it's already a good practice across OS.

@wxiaoguang

This comment was marked as outdated.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 26, 2022

Update: I over-thought something about the Git HOME problem.

Since it's fine to use a newly created directory in Gitea's data directory, there will a PR for it


Update: the PR:

@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 Jun 26, 2022
@justusbunsi
Copy link
Member Author

I guess #20114 makes the hint to that environment variable unrelated to 1.17 but still good to know for administrators. So I'll update this PR once the mentioned PR is done.

@jolheiser jolheiser added this to the 1.18.0 milestone Jun 27, 2022
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jul 8, 2022

Let's wait for

Then the {[repository].ROOT} will be replaced by {[git].HOME_PATH} accordingly.

(put a blocked label here to prevent from accident merge)

@wxiaoguang wxiaoguang added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Jul 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@87c563b). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #20134   +/-   ##
=======================================
  Coverage        ?   46.92%           
=======================================
  Files           ?      975           
  Lines           ?   134992           
  Branches        ?        0           
=======================================
  Hits            ?    63341           
  Misses          ?    63889           
  Partials        ?     7762           

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 87c563b...38fb53f. Read the comment docs.

@lunny
Copy link
Member

lunny commented Jul 8, 2022

#20114 merged, please resolve the conflicts.

@wxiaoguang wxiaoguang removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Jul 8, 2022
@justusbunsi
Copy link
Member Author

Conflicts resolved.

@lunny
Copy link
Member

lunny commented Jul 10, 2022

make L-G-T-M work.

@lunny lunny merged commit 9f3906b into go-gitea:main Jul 10, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 11, 2022
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Vertical align avatar at middle (go-gitea#20302)
  Changed scroll to auto for some UI elements. (go-gitea#20294)
  Add hint to GNUPGHOME environment variable (go-gitea#20134)
  Refactor SSH init code, fix directory creation for TrustedUserCAKeys file (go-gitea#20299)
  [skip ci] Updated translations via Crowdin
  Use dedicated draft PR icon when possible (go-gitea#20303)
  Update goldmark (go-gitea#20300)
  Do not create empty ".ssh" directory when loading config (go-gitea#20289)
vsysoev pushed a commit to IntegraSDL/gitea that referenced this pull request Aug 10, 2022
* Add hint for GNUPGHOME environment variable

With go-gitea#19732, the default location for the `.gnupg` folder has changed. To mitigate this breaking change, users can specify the home directory for gnupg via `$GNUPGHOME` environment variable to keep using their current location.

* Update docs/content/doc/advanced/signing.en-us.md

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants