Integration of Google Collaboratory with github

+1 vote
I have some repositories on github which i would want to import into Google Colab. How can i do this?
Mar 26, 2018 in Data Analytics by kurt_cobain
• 9,260 points
857 views

3 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Just run the below command:

!git clone githubrepohtml
%cd githubrepo_folder_name
answered Mar 26, 2018 by Bharani
• 4,550 points
+1 vote

You can use SSH protocol to connect your private repo with colab

1) Generate SSH keys

2) upload it to colab

from google.colab import files
uploaded = files.upload()

3) Move the ssh kay pairs to /root and connect to git

  • remove previously ssh files
    ! rm -rf /root/.ssh/*
    ! mkdir /root/.ssh
  • uncompress your ssh files
    ! tar -xvzf ssh.tar.gz
  • copy it to root
    ! cp ssh/* /root/.ssh && rm -rf ssh && rm -rf ssh.tar.gz ! chmod 700 /root/.ssh
  • add your git server e.g gitlab as a ssh known host
    ! ssh-keyscan gitlab.com >> /root/.ssh/known_hosts
    ! chmod 644 /root/.ssh/known_hosts
  • set your git account
    ! git config --global user.email "email"
    ! git config --global user.name "username"
  • finally connect to your git server
    ! ssh git@gitlab.com
4) Authenticate your private repository
5) Use ! git@gitlab.com:{account}/{projectName}.git
note: to use push, you have to give write access for
the public ssh key that you authenticate git server with.
answered Aug 7, 2018 by Kalgi
• 36,220 points
0 votes
answered Mar 9 by TEJAS
• 150 points

Related Questions In Data Analytics

+1 vote
1 answer

Custom Function to replace missing values in a vector with the mean of values

You have missed out on "na.rm=TRUE" inside ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,550 points
36 views
0 votes
1 answer

With the help of tidyverse: how to rename a column to a variable name

With the help of Dplyr: rename function ...READ MORE

answered Apr 3, 2018 in Data Analytics by DeepCoder786
• 1,700 points

edited Apr 3, 2018 by DeepCoder786 25 views
0 votes
1 answer

How to convert a list of vectors with various length into a Data.Frame?

We can easily use this command as.data.frame(lapply(d1, "length< ...READ MORE

answered Apr 4, 2018 in Data Analytics by DeepCoder786
• 1,700 points
38 views
0 votes
1 answer

How to count the number of elements with the values in a vector?

You have various options to count the ...READ MORE

answered Apr 12, 2018 in Data Analytics by darklord
• 6,140 points
44 views
+13 votes
2 answers
0 votes
1 answer
0 votes
2 answers

Integration of R with Java

there is a package called rjava that ...READ MORE

answered Dec 4, 2018 in Data Analytics by Kalgi
• 36,220 points
25 views
+1 vote
3 answers

Problem with installation of Wordcloud in anaconda

Using Anaconda Python 3.6 version For Windows ...READ MORE

answered Aug 7, 2018 in Data Analytics by Priyaj
• 56,140 points
2,145 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.