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 .gpg url (match github behaviour) #6610

Merged
merged 18 commits into from Apr 14, 2019

Conversation

5 participants
@sapk
Copy link
Member

commented Apr 14, 2019

After some testing of #4193 I added what was missing to have it working. Thx to @techknowlogick that lay down most of the bases.

Basically, we haven't in database what is needed to fully reconstruct the gpg armored export (ex: signature, full identities, ...).
I add a table containing the imported armored key that we can re-used to be join with others imported keys and exported.
Like github previous keys that need re-import are marked as a header (ex: https://github.com/sapk.gpg)

The only bug is that the cipherTypeByte are changed by the export by golang compared to the imported one but that doesn't change the interpretation of the gpg armored key.

techknowlogick and others added some commits Jun 9, 2018

@techknowlogick

This comment has been minimized.

Copy link
Member

commented Apr 14, 2019

@sapk Thanks for continuing this PR 😃

Show resolved Hide resolved routers/user/profile.go Outdated
@sapk

This comment has been minimized.

Copy link
Member Author

commented Apr 14, 2019

For info, imported vs exported key

techknowlogick and others added some commits Apr 14, 2019

Update routers/user/profile.go
Co-Authored-By: sapk <sapk@users.noreply.github.com>
@codecov-io

This comment has been minimized.

Copy link

commented Apr 14, 2019

Codecov Report

Merging #6610 into master will increase coverage by <.01%.
The diff coverage is 43.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6610      +/-   ##
==========================================
+ Coverage   40.47%   40.48%   +<.01%     
==========================================
  Files         405      406       +1     
  Lines       54388    54484      +96     
==========================================
+ Hits        22012    22056      +44     
- Misses      29349    29390      +41     
- Partials     3027     3038      +11
Impacted Files Coverage Δ
models/migrations/migrations.go 1.52% <ø> (ø) ⬆️
models/user.go 49.76% <ø> (ø) ⬆️
models/error.go 34.06% <0%> (-0.42%) ⬇️
models/migrations/v84.go 0% <0%> (ø)
models/models.go 56.59% <100%> (+0.18%) ⬆️
models/gpg_key.go 53.37% <39.62%> (-1.87%) ⬇️
routers/user/home.go 37.63% <46.87%> (+0.7%) ⬆️
routers/user/profile.go 35.77% <90.9%> (+2.44%) ⬆️
modules/log/event.go 65.98% <0%> (+1.52%) ⬆️

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 38889f0...308d7f3. Read the comment docs.

@techknowlogick techknowlogick added this to the 1.9.0 milestone Apr 14, 2019

@lunny

This comment has been minimized.

Copy link
Member

commented Apr 14, 2019

@sapk @techknowlogick good work. With integration tests are better.

@sapk

This comment has been minimized.

Copy link
Member Author

commented Apr 14, 2019

@lunny done

@lunny

lunny approved these changes Apr 14, 2019

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels Apr 14, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Apr 14, 2019

@techknowlogick techknowlogick merged commit d699de3 into go-gitea:master Apr 14, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details

@sapk sapk deleted the sapk-fork:export_gpg_keys branch Apr 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.