Github Action deploy to Vercel is using old work account #172101
-
Why are you starting this discussion?Bug What GitHub Actions topic or product is this about?Misc Discussion DetailsMy Github Action has been failing since a couple of days ago. My account email is originally How can I get the Actions Cache to use the right email? There are no caches to clear on Github Actions. Github Action to deploy to Vercel Actions step that is failing |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
not very sure why this happens, maybe :
even Possible Solution1. Update Commit AuthorsIf the commits being deployed are already authored by the old email, you can rewrite the commit history to use your personal email: git filter-branch --env-filter '
OLD_EMAIL="workemail@gmail.com"
CORRECT_NAME="Deric Walintukan"
CORRECT_EMAIL="personalemail@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tagsThen force-push the updated history: git push --force
2. Create a New Commit Before DeployingIf you don’t want to rewrite history, you can create a dummy commit with the correct email right before deploying: - name: Fix Commit Author
run: |
git config user.name "Deric Walintukan"
git config user.email "personalemail@gmail.com"
git commit --allow-empty -m "Trigger deployment with correct email"This ensures that the latest commit deployed to Vercel has the correct author. 3. Make Sure Vercel Team Membership MatchesCheck in Vercel that the email used (
Even if you fix commits, Vercel will still block deployments if the email isn’t authorized. 4. Clear Vercel Cache (Optional)Vercel sometimes caches commit info. You can try: vercel --prod --force --token ${{ secrets.VERCEL_TOKEN }}The so it's like :
if that still fails, rewrite the commit history to replace the old work email |
Beta Was this translation helpful? Give feedback.
-
|
@jfullstackdev thanks so much! The rewriting of the commit authors to my personal email fixed the issue. Cheers! |
Beta Was this translation helpful? Give feedback.
not very sure why this happens, maybe :
workemail@gmail.com(the old company email).git configin the workflow only affects new commits, but the commit in the repo already exists.even
vercel pullorvercel deploy --prebuiltwill fail if the commit author email isn’t associated with a Vercel team memberPossible Solution
1. Update Commit Authors
If the commits being deployed are already authored by the old email, you can rewrite the commit history to use your personal email: