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

[major, blocking] push declined due to user privacy reasons #1277

Closed
NullVoxPopuli opened this issue Dec 23, 2023 · 1 comment
Closed

[major, blocking] push declined due to user privacy reasons #1277

NullVoxPopuli opened this issue Dec 23, 2023 · 1 comment

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Dec 23, 2023

repro:

  • configure GH settings such that on https://github.com/settings/emails under your primary email it says something like this

    Not visible in emails
    
    This email will not be used as the 'from' address for web-based Git operations, e.g., edits and merges. We will instead use [email protected]
    

    I believe it's these settings:

    image

  • open a PR (to do work on) via pr.new/github.com/stackblitz/docs/tree/BRANCH-NAME
    docs: https://developer.stackblitz.com/codeflow/using-pr-new

  • make some changes

  • try pushing

  • see that it hangs forever

  • use CLI

  • observe:

    ~/NullVoxPopuli/ember-page-title/test-types add-types ⇡ 1s
    ❯ git push
    To https://github.com/nullvoxpopuli/ember-page-title.git
     ! [remote rejected] add-types -> add-types (push declined due to email privacy restrictions)
    error: failed to push some refs to 'https://github.com/nullvoxpopuli/ember-page-title.git'
    

    I believe the email privacy reasons are why stackblitz doesn't push via the sync changes button

To resolve, I tried the CLI:

git config --global user.email [email protected]
# but no difference occurred in git push outcome
git config user.email [email protected]
# but no difference occurred in git push outcome

this tells me that the git client in stackblitz does not read any git config, and instead uses the email for oauth, making it impossible to use pr.new to make changes if you have privacy settings turned on.

In the CLI,

❯ git config -l

init.defaultBranch=main
user.name=NullVoxPopuli
[email protected]
core.repositoryformatversion=1
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/nullvoxpopuli/ember-page-title.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.promisor=true
remote.origin.partialclonefilter=blob:limit=1024
branch.add-types.github-pr-owner-number=ember-cli#ember-page-title#272
branch.add-types.remote=origin
branch.add-types.merge=refs/heads/add-types
remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
remote.upstream.url=https://github.com/ember-cli/ember-page-title.git
pull.rebase=true

oh, no my conclusion is probably the wrong, the commits made using the UI have my actual email, I need to amend them.

❯ git rebase -i HEAD~2
git: 'rebase' is not a git command. See 'git --help'.

oh no. lol

not that rebase is a new command, but why is the git version behind so far?

❯ git --version
git version 2.32.0

current is 2.43 (nov 19, https://github.com/git/git/releases/tag/v2.43.0)
but stackblitz is using 2.32.0, which is from June 2021

other techniques to try to delete commits, but keep their changes:

❯ git reset HEAD^
fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

however, doing

❯ git reset most-recent-sha
❯ git reset second-most-recent-sha

seems to do the trick.

Another goofiness... could/should probably be a separate issue

git commit -am"Add test-types project"
hint: Waiting for your editor to close the file... 

opening an editor shouldn't happen if m is provided

And then!!!

git push succeeded. yay!

However

the UI is now out of date
image

so I will refresh the page

@NullVoxPopuli NullVoxPopuli changed the title push declined due to user privacy reasons [major, blocking] push declined due to user privacy reasons Dec 23, 2023
@SamVerschueren
Copy link
Contributor

Closing in favour of #933.

We have an internal ticket to track this and it is on our list to fix in the coming weeks. Thanks for the report and for letting us know how important this feature is for users 🙏 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants