I can't finish the GitHub sharing process - android-studio

There's an error while trying to push a project to GitHub. The Setting of "Keep my email address private" is checked, and the "Block command line pushes that expose my email" is checked. What's the solution?
I successfully created the project 'MyActivity' on GitHub, but the initial push failed:
remote: error: GH007: Your push would publish a private email address.
Event log screenshot

You need to set an email address for Git to use. Use your GitHub-provided email. For example, git config --global 2333223+username#users.noreply.github.com. You can find that in your email settings page.
After setting the email in Git, delete the already-created project on Git, and start the sharing process again.

Related

Gitlab project bot commit author as an authenticated user

I'm trying to set up a self-hosted Gitlab project with renovate to automatically create merge requests for dependency updates.
I created a Gitlab project token/bot with the name "renovate" which resolves to "project_123_bot". The rub is that my project uses push rules to "Check whether the commit author is a GitLab user". I do not know what I should use as the git commit author for renovate-generated commits. I've tried:
Renovate Bot <renovate#gitlab.myorg.com>
Renovate Bot <project_123_bot>
Renovate Bot <project_123_bot#gitlab.myorg.com>
among others, and I always get this rejection when pushing:
remote: GitLab: Author 'project_123_bot#gitlab.myorg.com' is not a member of team
What is the appropriate git commit author to use for project bots? Is it not possible for project bots to commit changes as a verified authenticated user?
The correct email seems to be project123_bot#example.com. I need to look into where the example.com comes from.
Edit: "example.com" is hard-coded, see https://gitlab.com/gitlab-org/gitlab/-/issues/292668

GIT uploads - Linux username shows instead of git username

I am using 2 different GitHub accounts to manage 2 different projects. My device is a Pixelbook using the Linux beta terminal for pushing commits. I have the two accounts set up using SSH keys, and there doesn't seem to be a problem there.
When I initially set up the Linux, I set the username as "My-username", which is coincidentally the same username as my GitHub A-account. I looked at the repos on the Github B-account and saw my Linux/A-account listed as the author. The link to the profile is the correct account (as in the link is for github.com/B-Account).
How can I either
A: change the Linux username to something less identifiable
or
B: (preferred) change the author for new commits.
I have seen a few questions on here saying I can change the author with a script or amend command... but I don't think I really care about the existing commits. I just want to make it show the actual GitHub account name as the author instead of my terminal name.
Edit:
The git config --global user.name command shows my full name, and the email is set in the --local for each repo with the appropriate email to the associated account.
I was able to find a solution to my problem!
inside of the .git/config file, I removed the credential.helper = store line that I had previously enabled while using HTTPS connections.
Now my commits are posting with the appropriate account!

Can't enable Gitlab notification email for failed pipeline

so I want to get email notification for failed pipeline builds, I tried to configure my gitlab settings as following: https://docs.gitlab.com/ee/workflow/notifications.html
But in my settings I see following:
There is no check box for Failed/Successful pipeline.
For the project I set it to 'Watch:' receive notifications from projects or groups user is a member of.
What am I missing?
Even if the question is old, the solution is the Gitlab Integration "Pipeline emails" (suggested by this other answer).
In short, in your project, go to Project -> Settings -> Integrations -> Pipelines emails and set the list of emails to notify.
The link to https://docs.gitlab.com/ee/workflow/notifications.html is no more active.
I found a blog post from 2020 on https://about.gitlab.com/blog/, explaining how to do.
Read it there : https://about.gitlab.com/blog/2020/06/17/notification-on-pipeline-succeeds/
In short, you have checkboxes for custom notification events like :
failed pipeline
fixed pipeline
successful pipeline
etc.
To access it, like said in the blog post,
Go to the Project overview page for the project.
Click the "bell" 🔔 (Notification setting) button and select Custom.
And before all, check your global notification email at : https://gitlab.com/-/profile/notifications

send mail to commiter after gitlab CI stage

in my .gitlab-ci.yml I have:
stages:
- test # unit tests
- proof # system tests
I want after each run send mail to committer how trigger run (in mail i want to have result of run). Could you tell me how should I do it or send me to same example?
To Bartłomiej Bartnicki.
It seems jaxxstorm talked about functionality in GitLab, which you can find by the path: your project -> Settings -> Integrations -> scroll down to the Project services and click by the "Emails on push" link and you will see the next settings page:
By enabling this service, you will be able to receive e-mail notifications about the result status of your builds.
In the Recipients area, provide a list of e-mails separated by comma.
The easiest way to do this is to use the build emails service

github notification to nodeJS when master get a commit

Is it possible if my master branch in my github repo gets an update that my nodeJS server got a notification ? so i can do stuff with it ? like get the version tag and commit message ?
First you need to go to your repo, and click through this sequence:
Settings -> Webhooks & Services -> Add webhook
Then paste the url where github will submit data for each new commit. You can find examples of payload in example.
Then implement the logic needed in the backend to work with info about new commits.

Resources