Setting up SSH keys, Git to contribute to Drupal.org

SSH Keys: 

https://www.drupal.org/drupalorg/docs/user-accounts/git-authentication-for-drupalorg-projects


cd ~/.ssh

ssh-keygen -t ed25519 -b 4096 -C "drupalcode.org"

Enter the filename. Ex: id_ed25519_drupalcode_org

ssh-add ~/.ssh/id_ed25519_drupalcode_org

vim id_ed25519_drupalcode_org.pub

copy the contents and create a new key at https://git.drupalcode.org/-/profile/keys

Test: ssh -T git@git.drupal.org


You can also add ssh config file 

vim ~/.ssh/config


Save the below contents

Host git.drupal.org

  AddKeysToAgent yes

  IdentityFile ~/.ssh/id_ed25519_drupal_org


Configuring Git:

https://www.drupal.org/docs/develop/git/setting-up-git-for-drupal/configuring-git-for-drupal

Note: Configure your name and email address
https://www.drupal.org/user/<your-id>/git

Committing:
Make sure username and email are correct in the folder you are committing

> git config --list 

credential.helper=osxkeychain

init.defaultbranch=main

user.email=gopisathya@159947.no-reply.drupal.org

user.name=gopiramanujam

core.repositoryformatversion=0

core.filemode=true

core.bare=false

core.logallrefupdates=true

core.ignorecase=true

core.precomposeunicode=true

remote.origin.url=git@git.drupal.org:project/jsonld_simple.git

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

branch.1.0.x.remote=origin

branch.1.0.x.merge=refs/heads/1.0.x

Otherwise

git config user.email '15850-gopisathya@users.noreply.drupalcode.org' 

git config user.name 'gopiramanujam'  


Comments

Popular posts from this blog

Programatically create layout builder section in Drupal

Code quality analysis of Drupal. Can I use Sonar?

Set up Drupal7 to Drupal8 migration in simple steps (using Drush)