Monday 12 February 2018

git remote show upstream seems to work :-)

Update (14:23): Changed to version 0.99.10 to be sure that I know what is going to be built and thus tested on Github.

git push upstream master

says that it's on Bioconductor so worked!


Checking the git status of drawProteins


Steps
1.  Open Terminal
2.  Using cd, navigate to drawProteins folder
3.  git status
Possible output
On branch master
Your branch is up-to-date with 'origin/master'.


nothing to commit, working tree clean

4.  Check the upstream connection with git remote show upstream
Possible output:
* remote upstream
  Fetch URL: git@git.bioconductor.org:packages/drawProteins.git
  Push  URL: git@git.bioconductor.org:packages/drawProteins.git
  HEAD branch: master
  Remote branch:
    master new (next fetch will store in remotes/upstream)
  Local ref configured for 'git push':

    master pushes to master (up to date)

5.  Pull Upstream Changes (http://bioconductor.org/developers/how-to/git/pull-upstream-changes/)
 git checkout master
 git fetch upstream
git merge upstream/master
Possible output:

Already up-to-date.

v1791-0a670637:drawProteins paulbrennan$ git fetch --all
Fetching origin
Fetching upstream

v1791-0a670637:drawProteins paulbrennan$ git merge upstream/master
Already up-to-date.

v1791-0a670637:drawProteins paulbrennan$ git push upstream master
Counting objects: 23, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (23/23), 3.38 KiB | 3.38 MiB/s, done.
Total 23 (delta 18), reused 0 (delta 0)
To git.bioconductor.org:packages/drawProteins.git
   4150fc6..ec5455e  master -> master


This seems to have worked.
Hopefully, build problems with Bioconductor will go away.

Check overnight build and see how it goes tomorrow.


Friday 9 February 2018

Trying to make my SSH work with Bioconductor...


OK, so today, I am trying to see if I can make sure that my master branch in Github and the drawProtein master branch on Bioconductor are synced.

I have to do this through Terminal because I want to link two upstream repos to my computer.

So it's an attempt to follow the New Package Workflow page...
http://bioconductor.org/developers/how-to/git/new-package-workflow/
According to the page:
"Bioconductor needs to know your SSH ‘public key’."

I have submitted this or at least I thought I did...
Today, I created a new SSH key for Github and Bioconductor and I submitted it again to Bioconductor:
So that's good.

A key step to submitting the SSH keys is copying id_rsa.pub to clipboard
On this page:
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

Code for copying id_rsa.pub to clipboard
$ pbcopy < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard



Some useful git commands to check remotes:

git remote show

In my case this gives two:
origin

upstream

So then:

git remote show upstream

and it returns:
* remote origin
  Fetch URL: https://github.com/brennanpincardiff/drawProteins.git
  Push  URL: https://github.com/brennanpincardiff/drawProteins.git
  HEAD branch: master
  Remote branches:
    devel  tracked
    master tracked
  Local branches configured for 'git pull':
    devel  merges with remote devel
    master merges with remote master
  Local refs configured for 'git push':
    devel  pushes to devel  (up to date)

    master pushes to master (up to date)

Good news! :-)

So try:

git remote show upstream

and it returns:
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

So this is not so good!
Try again tomorrow or Monday in the hope that the SSH key has been accepted and that I have some access rights.

As added info:
More here: https://git-scm.com/book/be/v2/Git-Basics-Working-with-Remotes















Remote Git Repositories....

If I understand correctly from here:
https://bioconductor.org/developers/how-to/git/new-package-workflow/
then,
I need to link two repositories to the master version of drawProteins on my computer.


Configure the “remotes” of your local git repository. You will need to push any future changes to your package to the Bioconductor repository, and pull changes the Bioconductor core team will make (e.g., bug fixes or bumping a version number for a new release). Add a remote to your machine’s local git repository using:
 git remote add upstream git@git.bioconductor.org:packages/<YOUR-REPOSITORY-NAME>.g


One of these will be my own github repository and the other will be the Bioconductor drawProtein repository....

Here are some resources about how to organise that:
https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes


I may be misunderstanding something but it seems that I have to use command line...
https://help.github.com/desktop-classic/faq/articles/can-i-work-with-multiple-remotes/