Tags

,

Solution A. By setting your Github username

$ cd rails-blog
$ cat .git/config  # Display the config file
$ vi .git/config   # Edit the config file

Edit the git config file in your local repo by changing the url value. E.g.,
From https://github.com/your_username/rails-blog.git to
https://your_username@github.com/your_username/rails-blog.git
Here’s a sample config file:

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
[remote "origin"]
  url = https://your_username@github.com/your_username/rails-blog.git   
  fetch = +refs/heads/*:refs/remotes/origin/*   
[bran+ch "materialize_ui"]
  remote = origin
  merge = refs/heads/materialize_ui

After editing the config, try to PUSH the changes to your Github repo and it will only ask to enter your password only.

Solution B. By caching your Github password in Git.

$ git config --global credential.helper cache
$ git config credential.helper 'cache --timeout=3600' 
## Cache to 3600 seconds
Advertisements