Reputation: 217
I am developing a project with next.js. The project is kept in a secret repository in the company's github account and my github account is authorized in this repository as colabrator. The project's development domain is also connected to the company's vercel account. We can see the changes we make from here.
However, I have been experiencing a problem for two days. When I add new branches, vercel does not give me access to my github account. As far as I understand, the company needs to switch to a pro account.
Despite this, yesterday we re-authenticated GitHub in to Vercel and the new branch I pushed was deployed without errors. I am trying again today and it does not work. I need to merge the new features of the project but I cannot.
Upvotes: 15
Views: 23609
Reputation: 1
I faced a similar issue when trying to update a deployment, and I received the error message: "A commit author is required." This typically happens when the deployment service requires a valid author for the commit being referenced. Here’s how you can resolve this issue:
Make a Commit with Author Information: If you need to specify an author for a specific commit, you can do so using the --author flag:
git commit --author="Your Name <[email protected]>" -m "Your commit message"
Push Your Changes:
git push
Create the Deployment: Now, when you create the deployment, ensure you reference the correct commit or branch. The deployment service should no longer show the "A commit author is required" error.
good luck!
Upvotes: -1
Reputation: 342
I didn't see this answer mentioned but this is what worked for me:
Then deployment works
Upvotes: 2
Reputation: 61
I had that problem and found a good solution that doesn't need the 'git config user.email' approach. So your commits will still be under your own Github account and count for your statistics.
You need to add the Deploy Hook URL to GitHub:
Now your Vercel deployments will start automatically when you push to your repository's main.
Upvotes: 6
Reputation: 161
A solution works for me.
Background that I faced the issue: I deploy a project on Vercel and work well. Today I update my code in git repo and appear the error message. Last time I update code in 60 days ago, and I do nothing change during the days. So I guess maybe Vercel update some project config options or my project configuration somehow changed.
Upvotes: 16
Reputation: 746
A non scalable solution (it's de facto not a ci/cd) is to create a meaningless commit in the repo from the Vercel git owner. I personally did it directly from the git web console just to update the project.
Main drawbacks:
Main advantages:
Upvotes: 0
Reputation: 83
It appears that many of us are facing the same issue. After posting a question in the community, I learned that collaboration is not permitted under the Hobby plan. This was previously allowed due to a bug, but Vercel has recently implemented a fix.
The only solution is to upgrade to the Pro plan, or do the final commit through the GitHub account that is directly linked to your Vercel account.
For a single project you can achieve this by git config user.email "vercel account email"
Or you may choose to do it globally sudo git config --global user.email "vercel account email"
Upvotes: 7
Reputation: 79
Click on the Details Link that is appearing below on the error. It will redirect you to a vercel page requesting access. If your vercel account is logged in, it will automatically give you access.
You should then make a change in code and push it. Your vercel will be working now.
Upvotes: 3
Reputation: 31
A week ago i started facing the same issue it seems like Vercel doesn't offer collaboration in the Free Tier anymore. There are 2 solutions to this problem :
Upvotes: 3
Reputation: 71
Switching to an automated CI/CD pipeline with GitHub Actions and triggering deployments via the Vercel CLI has resolved this issue.
Steps to Fix:
Upvotes: 7
Reputation: 1502
I prefer to have my email and do everything under my name and email address so everything goes under my Github statistics and everybody sees what I did when developing with multiple developers so I don't like the `git config user.email "[email protected]" approach and I commit a failed deployment and when I want to deploy, I have a GitHub account logged in in another browser that can commit to Vercel. There I do a dummy README space/space removal commit in the browser and deploy.
To automate a process where a dummy commit is made using a specific email when a commit is made by someone not using Vercel email I have created a .github/workflows/dummy-commit.yml
:
name: Dummy commit if someone else than [email protected]
on:
push:
branches:
- main # Replace with your branch
jobs:
enforce-email:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get commit email
id: get_email
run: |
email=$(git log -1 --pretty=format:'%ae')
echo "Commit email: $email"
echo "email=$email" >> $GITHUB_ENV
- name: Check email and perform dummy commit if necessary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EMAIL: ${{ env.email }}
run: |
if [ "${{ env.EMAIL }}" != "[email protected]" ]; then
echo "Email does not match. Performing dummy commit."
git config user.name "username or Name Surname"
git config user.email "[email protected]"
echo "Dummy commit at $(date)" > dummyfile.txt
git add dummyfile.txt
git commit -m "Dummy commit to deploy"
git push
else
echo "Email matches. No action needed."
fi
Now, create in your project's root a dummyfile.txt
and replace [email protected]
in 2 places and username or Name Surname
with the Vercel hobby plan Github email/username (or name). Also, replace the main
branch if needed. Also, give permissions:
It works, and I'm in a hurry now, but I also plan to squash the dummy commit with the commit that triggered it so as not to clutter the commit history with every second commit being a dummy. I'll update here when done.
Upvotes: 3
Reputation: 1510
I faced exact same issue and this is how I solved this. Created a new commit by setting git config user email as the vercel platform owner email ID and it worked
for example ; Suppose your vercel owner email ID is [email protected]. make a small change in the code (like adding a space or something). enter following command in terminal and then push to git. Now you will be able to deploy from that specific commit
git config user.email "[email protected]"
Upvotes: 16
Reputation: 57
I guess you need to ensure that your GitHub account is still properly authorized to access the repository.
Also try double-checking the project settings in Vercel. Navigate to the Git Integration settings and see if the new branches are properly set up for deployment.
If none of this works try deploying manually. Manually create deployments by commit or branch in the dashboard
Upvotes: 3